discord / discord-api-docs

Official Discord API Documentation
https://discord.com/developers/docs/intro
Other
5.95k stars 1.26k forks source link

Discord OAuth2 returns "Invalid code in request". #5579

Closed mrredo closed 2 years ago

mrredo commented 2 years ago

Description

I use the code query discord provides but taking that query and using that in a request to retrieve access_token returns an error {"error": "invalid_grant", "error_description": "Invalid \"code\" in request."}

Steps to Reproduce

Just use the code from the query discord provides. Make request to https://discord.com/api/v10/oauth2/token with all valid data

Expected Behavior

That it will return invalid code error description.

Current Behavior

Still the same.

Screenshots/Videos

https://paste.pics/7e9215eed6ceb99a6b027900956368aa

Client and System Information

Im using windows 10 pro. Im using v10 of discord api

james-the-elixir-guy commented 1 year ago

Did you do anything to mitigate this? I have started encountering this same problem. I have not changed anything about my code so I have to assume something has changed with Discord API.