Webhook avatar

Hi, I'm trying to create a webhook linked to my bot, which works correctly, but the avatar is not displayed even though the URL is correct. What am I doing wrong in my request? The webhook is correctly created with the right name but without the avatar.

Request:

import axios from 'axios';

(async () => {
  const createWebhook = await axios(
    'https://discord.com/api/v10/channels/1051883385179611260/webhooks',
    {
      method: 'POST',
      headers: {
        Authorization: 'Bot ....',
      },
      data: {
        name: 'Webhook Name',
        avatar: 'https://cdn.discordapp.com/icons/891685895781113886/36d2a944341ab14888afa1523ce19b57.png',
      },
    },
  );

  console.log(createWebhook.data);
})();
Was this page helpful?