Oauth2 Custom Token (Spotify Client Credentials Flow)

Hi all,

I recently struggled to use the Bubble API Oauth2 Custom Token system for Spotify’s Client Credentials Flow authorization flow.

I am posting the solution here in case this helps other people in similar situations.

The content type header is set to: application/x-www-form-urlencoded

The client id and client secret need to be concatenated with a colon between them, and then, converted to base 64. (NOT converted to base 64 and then concat’d as I did :P)

6 Likes

Thanks for this, I think/hope that this has solved my issue with Zoho CRM’s new OAuth for server applications.

But how does Bubble know how to refresh the token? I created a token by hand on Postman, pasted it here, and the calls work. The token expires after 1 hour; it’s been longer than 1 hour. It works in Bubble, but no longer in Postman. What sorcery is Bubble using that it figured everything out?

1 Like

Hi Rico,

I am pretty sure Bubble refreshes the token in the background. I’ve noticed this isn’t perfect with Spotify, but it’s pretty reliable.

Rob

Ava… thanks for posting this! Saved me hours of time and loads of frustration.

1 Like

Have you ever had issues with the calls ? I basically copied your configuration with my own tokens of course, everything does fine in Postman but Bubble keeps sending me this error : missing access_token getting data (Oauth2PWFlow)

I tried putting “access_token” in header, urls, parameters, nothing seems to work, here’s the config :

Oh! I haven’t used this integration for a long while. Sorry, can’t help you there.

Thanks anyway :smiley:

Hi, how I use OAuth2 Custom Token? I can find it as OAuth2 option in social login.