Chuyển tới nội dung chính

Clan Webhook

Clan webhook will send DM directly to each person's inbox, who receives the message depends on the username or user ID provided on the URL.

Creating a Clan Mezon Webhook

Follow these steps to create a webhook for your clan.

  1. Go to the clan you want to create a webhook for, click on clan banner to bring up a popup of actions that can be performed on that clan.

    mezon-webhook-005

  2. Click on the Clan Settings option and then go to the Integrations tab.

  • As a clan manager you can also manage both channel webhooks and clan webhooks here.

    mezon-webhook-006

  1. Click on Clan Webhooks and then New Clan Webhook to proceed with creating a new webhook.

    mezon-webhook-007

  • You will have one user (here named Komu Knight) and can customize this bot's name and avatar.

  • Click on Copy Webhook URL to get the webhook's endpoint, use it with the webhook payload to send messages to the user in your clan.

  • There are two ways to construct a complete Webhook URL after copying the base URL using the Copy Webhook URL button

    • Way 1: You have to combine the URL you copied with a valid Mezon Username to get a complete Webhook URL. The Mezon Username can be found in the user's Account Settings.

    mezon-webhook-008

    • Way 2: Alternatively, use the copied URL and combine it with a valid Mezon User ID to get a complete Webhook URL. The Mezon User ID can be found in the user's Account popup.

    mezon-webhook-009

Note

If you feel the token on your URL is compromised or outdated, reset it and copy the new URL and make sure the user has joined your clan.

Webhook Specification

Endpoint

The webhook is delivered via an HTTP POST request to a unique URL generated for each webhook integration combined with a unique user identifier.

URL Structure:

https://webhook.mezon.ai/clanwebhooks/{token}/{user-identifier}

URL Parameters:

ParameterTypeDescription
tokenstringA security token for authenticating the request. It appears to be a base64 encoded string or a JSON Web Token (JWT) containing information for verifying the request's authenticity.
user-identifierstringA unique identifier for the Mezon user. It can be either a username or a user ID.

Request Header

Request Body

Clan Webhook example

You can see the messages sent from webhooks in your Inbox.

mezon-webhook-010