Oauth2 category of discordjs.guide not up to date. need help with new stuff
so in the guide it says that the search params would contain an 'access_token' and a 'token_type'. but im only getting a param called code. how do i get the info of the user using this?
6 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by OPYou seem to have missed the first paragraph of this here, that explains how to get an access token instead of a code: https://discordjs.guide/oauth2/#implicit-grant-flow
oh oops. how do i do that tho? dont realy get it. is it something in the api, discord developer panel or while handling the request?
It's in the url you redirect your user to, to authorize your app on Discord.
so like this?
ohh nvm i found it thx