webhook-discord icon indicating copy to clipboard operation
webhook-discord copied to clipboard

GET on webhook not returning `token` in response

Open jamiechapman opened this issue 3 years ago • 1 comments

It appears that token is no longer returning by Discord (see https://github.com/discord/discord-api-docs/issues/3056) when using Discord webhooks generated by a bot. This causes the following issue:

UnhandledPromiseRejectionWarning: Error: 401 Unauthorized
    at [redacted]/node_modules/snekfetch/src/index.js:195:23
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

Does anyone have any recommended solutions for obtaining a token using this library?

jamiechapman avatar Jun 02 '21 17:06 jamiechapman

I'm not sure I follow. If you specify a full webhook URL in the constructor it should contain the webhook token, so the response should include it as well right?

jb3 avatar Jun 02 '21 22:06 jb3