Help with OAuth

Hey, im trying to get oauth working but i cannot figure out whats gone wrong. im using html and php to do this but i think ive done something wrong somewhere. HTML code: https://pastebin.com/vtziBY47 JS code: https://pastebin.com/HSjpmrTn PHP code: https://pastebin.com/d18rkuJj and i get this when i press authorize on the discord login page
<br />
<b>Warning</b>: Undefined array key "access_token" in <b>/var/www/landing/php/oauth.php</b> on line <b>31</b><br />
<br />
<b>Warning</b>: Undefined array key "username" in <b>/var/www/landing/php/oauth.php</b> on line <b>49</b><br />
<br />
<b>Warning</b>: Undefined array key "id" in <b>/var/www/landing/php/oauth.php</b> on line <b>50</b><br />
{"username":null,"id":null}
<br />
<b>Warning</b>: Undefined array key "access_token" in <b>/var/www/landing/php/oauth.php</b> on line <b>31</b><br />
<br />
<b>Warning</b>: Undefined array key "username" in <b>/var/www/landing/php/oauth.php</b> on line <b>49</b><br />
<br />
<b>Warning</b>: Undefined array key "id" in <b>/var/www/landing/php/oauth.php</b> on line <b>50</b><br />
{"username":null,"id":null}
i honestly dont know what i could've done wrong
4 Replies
d.js toolkit
d.js toolkit•5mo ago
- 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 staff
Unknown User
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
RogueRiftWalker
RogueRiftWalker•5mo ago
@sïř.jõ https://discordjs.guide/oauth2/#getting-an-oauth2-url how come on the djs guide it has this?
Unknown User
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server