OAuth 2.0 - API - How to with APIs?

Hi There !

I’m authenticating Pinterest with OAuth 2.0.
How to make an API adrress to get the “code” back, without going to the Pinterest page itself?

Has someone saw a tutorial about that?

I think it is an ugly workflow to send the user to another app, then come back…
Is there a way to do that without getting out of my app?

Tks!

What do you mean? When user first authenticate, it follow the authorize URL that is on the API Provider, and go back to your app with the code that is exchanged for access token. This is how oAuth2 work.

Jici, I saw many apps that seems open a window inside your app (maybe a flotaing iframe)… I don’t know how that is made…

  1. I “think” the “code request” is made by an API trigger;
  2. The “returning code” triggers an API address, that triggers the token process…
  3. Finally the Floating Iframe is closed automatically.

So, the user doesn’t have the feeling to get out of you app…
Is it possible?

Maybe they open an iframe, but in this case, you will need to do your auth configuration manually: [Showcase] Manual OAuth2 Token Integration

The code request is not made by api request, but it’s done by going to the authorize URL (authentication page). The first API request made is to exchange the code for access token. This is done by calling the token endpoint.

And Bubble will complete by doing another API call to fetch user data.

This topic was automatically closed after 70 days. New replies are no longer allowed.