how to get access token to access discord api
currently i got an issued with accessToken with auth discord can you help me ?
15 Replies
hello brother @Ping !
Hey, do you know what specifically is going wrong?
@𝐊𝐘𝐔𝐔 🐣💞
i don't know
sorry
i tried to config with 3h but still doesn't work now i got rollback to use with directly auth
Do you have an error message or something that indicates to you it's not working?
i want to know the way to get accessToken from the user table
the account.provider we call from db or session ?
If you're on the front-end, you can call
authClient.listAccounts()
and that will return an array containing all of the accounts which represent the user. From there you'll need to get the one specific for discord
and then call the getAccessToken
endpoint with that provider id
I recommend console.logging the responses just to test and know what it returns
i still don't understand, if i have many account so how can i get the specifically user account ?

it's work
Thanks brother @Ping ! do you have any recommend about it ?

how can we handle page when user click cancel with Discord Auth ?
Thanks