Discord Webhook API

FREE
By Uiop 3385 | Updated un mese fa | Tools
Popularity

7.9 / 10

Latency

912ms

Service Level

100%

Health Check

N/A

README

The API uses GET requests to receive data.

Getting a webhook URL:

To get a webhook URL:

  1. Go to any server where you have the “Manage Webhooks” permission.
  2. Go to the settings of the channel you would like the webhook messages to be sent to.
  3. Select the “Integrations” category.
  4. Click on “View Webhooks”, then on “New Webhook”
  5. Click on your newly created webhook, and press the “Copy Webhook URL” button.
  6. Paste this webhook URL into the testing box or inside of your code, and then you’re good to go!

Routes:

  • /send-message:

    • Arguments:

      • webhook_url:
        • Input: String: URL of the webhook (example: https://discord.com/api/webhooks/1068982219214950420/37QdVnf9Qhs_j6HBCpB6dCe0bz57qeeKbaAEUPBG1PIsJejBVReHoztgquuDJFlFCYMm)
        • Necessary: Yes
        • Info: To get a webhook URL, you first need to have a Discord server, whether it’s your own or one where you have the Manage Webhooks permission. Head over to the channel where you wish the webhooks to be sent, then edit that channel. Go to Integrations and click on Webhooks. Select an existing one or create a new one. You can customize the name and the profile picture of the webhook there. Click on Copy Webhook URL, and you now have your webhook URL.
      • message:
        • Input: Content of the message to send
        • Necessary: Yes
        • Info: Enter whatever you want to have as your message. This is what the webhook will receive and what will appear in the channel.
    • Example request:

  • /send-embed:

    • Arguments:

      • webhook_url:
        • Input: URL of the webhook (example: https://discord.com/api/webhooks/1068982219214950420/37QdVnf9Qhs_j6HBCpB6dCe0bz57qeeKbaAEUPBG1PIsJejBVReHoztgquuDJFlFCYMm)
        • Necessary: Yes
        • Info: To get a webhook URL, you first need to have a Discord server, whether it is your own or one where you have the Manage Webhooks permission. Head over to the channel where you wish the webhooks to be sent, then edit that channel. Go to Integrations and click on Webhooks. Select an existing one or create a new one. You can customize the name and the profile picture of the webhook there. Click on Copy Webhook URL, and you now have your webhook URL.
      • title:
        • Input: String: Title of the embed
        • Necessary: If there is no other content in the embed
        • Info: The title, if no author components have been added, is what will be the main text displayed at the top of the embed. It will be in bold by default, and no further text customization can be added to it.
      • content:
        • Input: String: Main content of the embed, also referred to as Description
        • Necessary: If there is no other content in the embed
        • Info: The description is located just below the title, to the left of the thumbnail. It can be as long as you want and can use every text decoration available.
      • footer:
        • Input: String: Final text of the embed.
        • Necessary: If there is no other content in the embed
        • Info: The footer is at the absolute bottom and is written in a smaller font than the rest. It is useful for adding some kind of branding when combined with footer_icon.
      • color:
        • Input: Decimal/Hexadecimal: Color on the absolute left of the embed.
        • Necessary: No
        • Info: The color takes in as input decimal and hexadecimal values. Example of an hexadecimal value: FF8080, same color but in decimal : 16744576. Hexadecimal is strongly recommended as decimal has a high chance of error. If no input is given, the color will default to 000000, full black.
      • thumbnail:
        • Input: String: URL of an image
        • Necessary: If there is no other content in the embed
        • Info: The thumbnail acts as a small image that displays on the top right corner of your embed. Use it to accompany your title and description.
      • image:
        • Input: String: URL of an image
        • Necessary: If there is no other content in the embed
        • Info: The image will always be displayed at the bottom of your embed, just above the footer. It will display at a much bigger size than the thumbnail. Use it to make your embeds more complete.
      • author_name:
        • Input: String: Name of the author of the embed.
        • Necessary: If there is no other content in the embed
        • Info: Use this author component along with author_icon and author_url. They allow you to make the embed look like it was sent by someone.
      • author_icon:
        • Input: String: URL of an image
        • Necessary: If there is no other content in the embed
        • Specifications: Will not work if not used with author_name
        • Info: Adds a profile picture to your author_name.
      • author_url:
        • Input: String: Any valid URL
        • Necessary: No
        • Info: If you put this argument and an invalid URL, the embed will fail to send with error code 400, although there will be no error sent. If you’re not sure about this feature, just keep away from it. Allows the user to get redirected to a URL by clicking on the author_name text.
      • footer_icon:
        • Input: String: URL of an image
        • Necessary: If there is no other content in the embed
        • Specifications: Will not work if there is no footer text in the embed
        • Info: Acts as author_icon, but for the footer. Looks the same.
      • timestamp:
        • Input: String: “True” or nothing
        • Necessary: If there is no other content in the embed
        • Specifications: Will not work if there is nothing in the embed
        • Info: Displays the date and time when this embed has been sent. It is displayed either next to the footer if there is one or in position of the footer is there isn’t one. This information is already displayed as a default Discord feature. If this argument isn’t defined, or something else than “True” is inputted, it will default to not display.
      • field_count:
        • Input: Integer
        • Necessary: If there is no other content in the embed
        • Info: Field count allows you to set the amount of fields you’d like in your embed. A field contains a title and a content, and they are by default located side to side. You can enter whatever number you want, however, if you enter anything above 0, you will need to add necessary arguments : fieldXtitle and fieldXcontent, where X is the field number. If you enter 2, for example, you will need to have field1title, field1content, field2title and field2content as arguments. Titles are bold by default and text decoration don’t work on them. However, you can use decoration in the content of those fields. If this argument isn’t defined, it will default to 0 and therefore not add any fields. The maximum number of field supported by Discord is 25, and so is the limit for this API.
      • fieldXtitle (where X is the field number):
        • Input: String
        • Necessary: Only if field_count is not 0
        • Info: Described in field_count
      • fieldXcontent (where X is the field number):
        • Input: String
        • Necessary: Only if field_count is not 0
        • Info: Described in field_count
      • inline:
        • Input: “False” or nothing
        • Necessary: Only if field_count is not 0
        • Info: By default, all fields are located side to side. If you disable inline, they will no longer display next to each other but below each other. If this argument isn’t defined, or something else than “False” is inputted, it will default to inline.
    • Example request:

      • const options = {
        method: ‘GET’,
        url: ‘https://discord-webhook-api.p.rapidapi.com/send_embed’,
        params: {
        webhook_url: ‘This is the webhook URL’,
        content: ‘This is the content of the embed’,
        title: ‘This is the title of the embed’,
        footer: ‘This is a footer’,
        footer_icon: ‘This is the URL to the footer’s icon’,
        thumbnail: ‘This is the URL to the thumbnail’,
        image: ‘This is the URL to the image’,
        color: ‘Hexadecimal color (no #)’,
        author_name: ‘This is the name of the author’,
        author_icon: ‘This is the URL to the author’s icon’,
        author_url: ‘This is the URL that you go to when you click the author_name’,
        timestamp: ‘false’,
        field_count: ‘2’,
        field1title: ‘First field title’,
        field1content: ‘First field content’,
        field2title: ‘Second field title’,
        field2content: ‘Second field content’,
        inline: ‘true’
        },
        headers: {
        ‘X-RapidAPI-Key’: ‘c5b95f8528mshf1f5bc84f19adc9p17bbc9jsneab16a8b5a3f’,
        ‘X-RapidAPI-Host’: ‘discord-webhook-api.p.rapidapi.com
        }
        };

Notes:

  • It does not matter the order you put the arguments in.
  • In order to ping users, refer to a channel, or ping a role, use the following respectively: @, # and &@, inside of <>, followed by the ID of said person, channel or role. Example : < @98269471649 > (no spaces).
  • Please read this if you wish to mention users in your embeds : https://discord.com/developers/docs/resources/channel#allowed-mentions-object (advanced)

If you have any questions, please contact me by email : uiop.uiop.uiop.3385@gmail.com

This API will be free, forever.
Thank you!

Followers: 3
API Creator:
Rapid account: Uiop 3385
Uiop 3385
uiopuiopuiop3385
Log In to Rate API
Rating: 5 - Votes: 1