-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Hi! I'm trying to add discord auth to my reactjs app. So the problem is that I cant receive user auth token from https://discordapp.com/api/oauth2/token because it send me 401 code, meaning that it needs Authorization header. But there is no mentions for this header in docs and I can't understand how I need to pass it if Im asking for auth token.
Code:
let data = {
client_id: client_id,
client_secret: client_secret,
grant_type: "authorization_code",
code: token,
redirect_uri: "https://mttvapp.com/",
scope: "identify"
}
data = $.param(data)
discord.post("/oauth2/token", {data}, {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
Metadata
Metadata
Assignees
Labels
No labels