Error with Discord OAuth

Hello. Trying to setup Discor login and get this error:

API Connector error: the Oauth2 API Discord-login is not configured properly - Received error from api The service this service just returned an error (HTTP 401). Please consult their documentation to ensure your call is setup properly. Raw error: {“error”: “invalid_client”} API Connector error: the Oauth2 API Discord-login is not configured properly - Received error from api The service this service just returned an error (HTTP 401). Please consult their documentation to ensure your call is setup properly. Raw error: {“error”: “invalid_client”}

hey @imaguru

I’m not familiar with Discord’s API but just a thought - have you tried removing all parameters from that URL in the Login dialog redirect field?

Based on the documentation it also looks like you shouldn’t have that /api in there

Try it again with https:// discord.com/oauth2/authorize

Ambroise

1 Like

Will add to @ambroisedlg but you shouldn’t have anything else than https://discord.com/oauth2/authorize in authorize endpoint (nothing after for the client id and other stuff… Bubble will add it for you)

2 Likes

In this way I have another error
image

Where or when do you have this error?

Here, when I tried login with discord
image

@imaguru not sure why’re you’re having this error - any reason why you’re not using the Discord Auth plugin though, instead of API Connector?

Can you show the url you have when you click on the signup button?

@imaguru this config worked for me

Note that the URLs are not the same https://discordapp.com/ instead of https://discord.com

1 Like

I tried few plugins and I have errors with all of them

Change to https://discordapp.com/ but still have this error. Mayby problem in discord app?

this url work for me but there’s an error in the space between your scopes
this is the url you should get;
https://discord.com/oauth2/authorize?client_id=1062335892833964032&redirect_uri=https:%2F%2Fimaguru.host%2Fapi%2F1.1%2Foauth_redirect&response_type=code&state=%257B%2522debug_mode%2522%253A%2522true%2522%252C%2522oauth_provider%2522%253A%2522apiconnector2-cmjqm%2522%252C%2522resume_key%2522%253A%25221674147665613x465100227164646300%2522%252C%2522used_redirect_url%2522%253A%2522https%253A%252F%252Fimaguru.host%252Fversion-test%252Flogin-s10%252Fsignup%252F%253Fdebug_mode%253Dtrue%2522%252C%2522redirect_unique_id%2522%253A%25221674147665989x613458061407708000%2522%257D&scope=email%20identify

Are there should be any link ?

@imaguru

I didn’t put any links there, just the redirect_uri in the OAuth2 screen

Also maybe a dumb question but worth checking - you got your App Secret from there, right?

1 Like

Nope. I am idiot… used public key instead of secret key. Thank you so much

1 Like

No problem!