Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid webhooks tokens #6851

Closed
ker0olos opened this issue May 10, 2024 · 0 comments
Closed

Invalid webhooks tokens #6851

ker0olos opened this issue May 10, 2024 · 0 comments
Labels

Comments

@ker0olos
Copy link

Description

This has been an issue in my bot for months.

My bot receives command requests through its interactions endpoint url.

I mostly respond to all messages by deferring and updating the message later when the data is ready, since that's a better option UX wise.

Following the docs, editing an initial messages is through:
PATCH /webhooks/<application_id>/<interaction_token>/messages/@original

This works, most of the time, but sometimes, the tokens discord sends me don't work.
As you can see in my sentry. Hundreds of messages fail due to this error.


Note

While the token is still active in the 15 minutes window, any API requests send to it return with 404: Not found

Note

After the 15 mins window, any API request made to it returns 401: Unauthorized

Note

Again this is true for all API requests using the token, including deleting the message, getting the message, and sending a followup.


  • I tried retying the failed requests, delaying then retying, lowering the API version, but nothing worked so far.

  • Tokens are not modified after being received.

Steps to Reproduce

Issue is unclear and hard to reproduce.

Expected Behavior

New tokens should work for 15 mins.

Current Behavior

Some fresh tokens are invalid/unknown/not found.

Screenshots/Videos

No response

Client and System Information

My bot/app is https://github.com/ker0olos/fable
It sends requests directly to Discord API, I don't use a third-party library.

Production version is hosted on Deno Deploy.

@ker0olos ker0olos added the bug label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant