[New Feature - Beta] API Connector and OAuth2 APIs

An email to support would be better if you can. Forum PMs are generally speaking not great to follow up on.

Just emailed. Thanks!

Just noticed this

Thanks @emmanuel and team

1 Like

Can you use this new feature to access users’ Google Analytics data? I’m trying to set it up, but I keep getting an error message when I try to authenticate in run mode.

1 Like

Did you get Instagram working? Or has anybody else? If so, mind posting a screenshot?

So it turns out you can only get self profile details. Otherwise you need to submit ur app to instagran and get access to other scopes.

In the accessible endpoint not requiring a new scope permission (for e.g. /self/recent/media endpoint), instagram returns objects as nested lists. Bubble doesn’t recognise them hence couldn’t access it.

1 Like

Bubble should recognize nest objects by flattening them. If you can identify a place where it doesn’t happen please file a bug report.

Can you post a screenshot of your IG call?

@csblack

This is the one that works

2 Likes

Mucho appreciado!

1 Like

@emmanuel Fantastic to see this in the product! I haven’t tried it yet but will do so soon. I’m still in need of doing Service-to-Service (2-leg) OAuth2 using JWTs (Google’s requirement for using any of their APIs as a service account). Do you have any info on when this might be added now that basic OAuth2 support has been added? Thanks!

Probably not super soon, we have a lot to do to make sure oauth2 works everywhere before looking at JWT.

@emmanuel
Can we see the raw response received by bubble at any spot where ‘Get data from external api’ is used ?
Will be helpful in debugging or setting up workflows using api connector

I guess we could do this at the initializing level in the editor. Having this in run mode is a little bit more challenging.

2 Likes

Hi All,

I just wanted to follow up with everyone regarding the integration of Oauth2 for Paypal since Emmanuel spent a good deal of time with me over email to fix the issues I was having. Keep in mind that this pertains only to Paypal, however some of the notes I make below could carry over to other applications.

The initial issue I was having was that Bubble was not recognizing the access token from Paypal because Paypal uses Basic Auth in order to request the token. This functionality was missing from Bubble and was added by Emmanuel throughout our triaging of the issue. Otherwise, we were just doing some trial and error testing to get the setup right in the API connector panel. In general, please follow the below instructions to set up paypal properly:

  1. You must have a valid Paypal developer account in order to add this functionality. Once you set up a developer account, you will receive “sandbox” credentials to test the functionality.
  2. This tripped me up the most…the redirect URL that you place in your Paypal developer dashboard must be the URL for the same page in in which the link to your paypal authorization resides. E.g., if you click on a button on http://www.mysite.com/signin, the redirect URL in your paypal developer dashboard must be that exact link and nothing different or else you will get a relying party validation error and not see the Paypal login. Also, once you place the redirect URL in the appropriate box it might take up to 3 hours for the settings to take effect.
  3. You must ensure that when you initially set up the Oauth2 authorization call you DO NOT add any sequential page actions in the workflow panel or else you won’t get the success message that you set up the Oauth2 connection correctly with Paypal.
  4. Finally, please find below the proper parameters to use in the API connector panel:

-Scope: openid
-Authentication goes in the header-checked
-APi uses the refresh token mechanism-checked
-Request an access token uses Basic Auth-checked
-App ID: Comes from Paypal dev dashboard
-client secret: Same as above
-Login dialog redirect: https://www.sandbox.paypal.com/webapps/auth/protocol/openidconnect/v1/authorize
-Access token endpoint: https://api.sandbox.paypal.com/v1/oauth2/token
-User Profile endpoint: https://api.sandbox.paypal.com/v1/identity/openidconnect/userinfo?schema=openid
-User ID key path: user_id
-User email key path: email

This should clear up a lot but if anyone has any further questions feel free to post here or message me personally. Thanks!

4 Likes

Hi @emmanuel, long time mate.

uhh this Paypal API Call won’t work for me for some reason and I wanted to ask for your help.
My credentials are put in correctly and so it the Paypal redirect uri.

@jonathan.timianko has gone to unimaginable lengths to aid me with my endeavours. We both concluded that the Bubble team are the ones to reach out to.

As you can see @emmanuel, I have correctly put everything together with this thread in reference.
That being said the next screen grab shows the problem i’m facing: The Paypal page is not loading This is similar to @jonathan.timianko previous problem if not the exact same:

When I click the sample red “edit me” button below that should bring me to the Paypal user signup/login page, the blue bar near the address bar keeps loading at the top of the screen endlessly and I never ultimately get there

Unfortunately, without a link for others to test, it’s really really hard to help.

@emmanuel What do you mean link? How could you authenticate without having editor privileges? I’m not sure I get what your saying bro!

@emmanuel Let’s take this into support emails please

A run mode link, at least, would be helpful.

1 Like