# Webhook

The plugin can send a webhook to Discord when your WP Discord Invite Link is clicked.&#x20;

The webhook will contain the WP Discord Invite Link its equivalent Discord Invite Link the total number of clicks to the link.

You have two ways to configure webhook for the plugin:

1. Login with Discord Automatically
2. Create Webhook manually

#### Login with Discord Automatically

1. Go to wp-admin -> WP Discord Invite -> Click Count
2. Click on `Login with Discord` Button
3. This will open Discord
4. Select the server in which you want the alerts to be sent
5. Select the channel and authorize it
6. This will automatically create a Webhook URL and save it to the plugin.
7. Now the plugin will send a message when someone clicks the WP Discord Invite Link.&#x20;

#### Create Webhook Manually

1. You need to create a webhook in Discord for the channel to which you want the webhook to be sent.

```plaintext
Creating webhook URL in Discord:
1. Open your Server Settings and head into the Integrations tab:
2. Click the "Create Webhook" button to create a new webhook!
3. No need to edit the avatar and name as those will be overridden by the plugin. 
4. Select the channel in which you want the plugin to post the messages.
5. Click the `Copy Webhook URL` button.
```

&#x20; 2\. With the webhook URL copied go to wp-admin → WP Discord Invite → Click Count

&#x20; 3\. In the webhook section click the check box next to `Enable Webhook` to enable the webhook paste the Discord Webhook URL copied in the previous step in the text box next to the text saying `Discord Webhook URL`&#x20;

&#x20; 4\. Click `Save Changes` . Now the plugin will send a message when someone clicks the WP Discord Invite Link.&#x20;

&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sarveshmrao.in/wp-discord-invite/webhook.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
