> ## Documentation Index
> Fetch the complete documentation index at: https://docs.worldvisagroup.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Discord Chat Integration with WorldVisa

> Connect Discord to WorldVisa to send chat notifications through workflows. Create a bot, generate the webhook URL, and store credentials for delivery to channels.

When using Discord, you will have to store the integration credentials within the subscriber entity. Discord supports two ways to do this:

1. Using the **Discord Webhook** integration.
2. Using the **Discord Bot** integration.

Right now, WorldVisa only supports the **Discord Webhook** integration. This approach has been because the easiest way to set it up is when you have a predefined destination for where the notifications should be sent. It's particularly useful for notifying a specific channel about updates.

**Quickstart:**

To get started with using WorldVisa's Discord Webhook integration, you need a 'webhook token'. Here's how you can generate the same for testing purposes:

1. Go to the channel you want to add the webhook to (you need to be an admin of the discord server).
2. Right-click the channel and select "Edit Channel".
3. Integrations -> Webhooks -> New Webhook
4. Copy the webhook URL.
5. After obtaining the webhook URL in the previous step, you need to store it within the subscriber entity. Doing this ensures that WorldVisa knows where (in which discord channel) to send the notification to. Here's how to do it:

```bash theme={null}
curl -L -X PUT "${WV_API_URL}/v1/subscribers/<SUBSCRIBER_ID>/credentials" \
-H 'Content-Type: application/json' \
-H "Authorization: ApiKey ${WV_API_KEY}" \
-d '{
  "providerId": "discord",
  "credentials": {
    "webhookUrl": "<WEBHOOK_URL>"
  },
  "integrationIdentifier": "discord-MnGLxp8uy"
}'
```

Checkout the API reference for more details.

* `subscriberId` is a custom identifier used when identifying your users within the WorldVisa Developer Platform.
* `providerId` is a unique provider identifier. Use the provider ID shown in the request example.
* The `credentials` field contains the delivery details. In this case, we use the `webhookUrl` property to specify the webhook URL generated in the previous step.

6. You are all set up and ready to send your first chat message using the WorldVisa REST API in the channel you chose on your discord server.


## Related topics

- [WhatsApp Business Chat Integration with WorldVisa](https://docs.worldvisagroup.com/developers/integrations/chat/whats-app.md)
- [How to Write Chat Templates in WorldVisa](https://docs.worldvisagroup.com/developers/integrations/chat/writing-chat-template.md)
- [Integration conditions](https://docs.worldvisagroup.com/developers/integrations/integration-conditions.md)
- [Pushpad Push Integration with WorldVisa](https://docs.worldvisagroup.com/developers/integrations/push/pushpad.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.