OAuth2 User-Agent Flow (Pinterest): token_type "bearer" vs. "Bearer"

I want to allow users to signup/login with their Pinterest account. However, I haven’t been able to get the OAuth2 User-Agent Flow working (although I’ve been able to set this up successfully for other providers in the past).

Here is my current setup in the Bubble API Connector:

When I run the workflow, this is the error I receive:


I’ve been able to complete the OAuth2 User-Agent Flow successfully in Postman, but noticed that when I exchange the temporary code for the access_token, the token_type is bearer instead of the usual Bearer (capital “B”). Is this the cause of my problem? I’m open to any potential workarounds or solutions.

1 Like

OAuth is a nice challenge, I don’t have the solution to your problem. But I have implemented OAuth in this way, just with workflows and the API connector. This way, you also learn the logic behind it. https://www.youtube.com/watch?v=revwzSG-fL4

I’ve been able to implement OAuth using the User-Agent flow in the past as well, but for some reason am having difficulties with Pinterest. Again, I think it may be due to the bearer token string, although I could very well be mistaken. I’ll take a step away to work on other elements of the project and attempt to review with fresh eyes. Thanks for the resource.