Stuck manually authorizing with OAuth2: “Invalid state from oauth provider”

Hi all,

Authorizing with SoundCloud OAuth2 through Bubble’s OAuth2 User-Agent Flow works perfectly fine, but it seems I cannot save access_token, refresh_token, expires_in and scope data to my DB through this method? (hope I’m missing something?)

For this reason I’m trying it manually but I’m stuck with the error:

{“statusCode”:400,“body”:{“status”:“ERROR”,“message”:“Invalid state from oauth provider”}}

I do get the code parameter from SoundCloud in the response URL, and also the state parameter with the exact same state as I created for the authorization request. Yet Bubble returns “Invalid state from oauth provider”.

Any thoughts?


did you solve this problem?

facing the same issue but with instagram o-auth, anyone know the answer?
would be super grateful!!

Hey, you need to url encode your link for it to work

Would you mind sharing your setup?
The url encoding doesnt work for me with bubble throwing an error when i click on the button that should open the link:

Use a text und use detect links and emails. then url encode only the part after the websites the scope (everything that’s not working in a normal url like spaces etc)