[New Feature - Beta] API Connector and OAuth2 APIs

This one has been awaited for a long time, and we’re happy to release it today. We’re calling it beta as we expect a few cases we don’t handle yet (each API comes with different situations).

You can now add your own APIs for authentication, provided they follow the standard OAuth2 protocol. This will let you

  1. let your users authenticate with services we don’t have yet (let say, Spotify)
  2. get data and post data to these services as the logged in user.
    In short, it’ll be very much like what you can already with Facebook, Pinterest, etc.

You need to be familiar with these things a little bit to set it up, as you need to find the relevant endpoints and other info in the documentation of the service, but there is no code needed :slight_smile: See below what it looks like for Spotify.

You’ll need to find the two URLs for authorization and to generate the server-side token request, and the endpoint to get the current user’s profile. What we need here (it’s necessary), is the ID of the user, let’s say in Spotifiy. If you have email access in the scope, you’ll get it from there, but it’s not necessary.

One important thing to note is that you need to test the flow as yourself, with the debugger being present, so that we have have a token to test the calls that you’ll add afterwards. And if for some reason the token expires, you’ll be prompted in the box to go to run mode, go through a workflow that signs you with Spotify to get a new token.

If you hit weird situations, error messages that don’t make sense to you, please file a bug report.

30 Likes

This is a BLESSING for Usercard

I am so excited. Thank you thank you!!

2 Likes

This is a game changer!

1 Like

Please try adding APIs in a test app first, not in production. That will make debugging easier as well.

3 Likes

Nice :slight_smile:

The redirect comes back to the same page as you went from… is that by design ? How do you see that being handled ?

What is the “User Profile endpoint” for ? Assume it is something like … https://www.googleapis.com/plus/v1/people/me

I got the Google Calendar API to work (developer console is saying no errors) and I got redirected back to my app, but I still don’t get the API being marked as valid. Interestingly I didn’t get anything back on the URL.

Switched over to https://www.googleapis.com/auth/plus.login as a scope, and now I get what looks like a better URL …

But still not valid ?

Yes, by design we always bring back users to where they’re from (same is you use facebook). it’s important if the workflow has more actions after this, which is usually the case.

We save the code, generate the token behind the scene, so you shouldn’t have anything in the URL.

Regarding Google and your app I get this below. Google is extra-super-annoyingly strict about URLs, so it may be about this.

Please send us a bug report if the API isn’t marked as valid after you successfully sign up.

Thanks, will file a bug.

In terms of the page redirect… how can you tell the the user has authenticated ? So how can I change the page based upon having authenticated. So I have a button “connect your account” … and I don’t want to come back to the same button. You tend to have an oauth2redirect page.

Well you can put this at the next action in the workflow, go to another page, etc. This is exactly as facebook works (the API connector doesn’t make anything different).

Ohhhh, I see now :slight_smile:

I had wrongly assumed that the login redirect would reload the page and thus you wouldn’t restart the workflow.

2 Likes

This is great news, Emmanuel, we’ve been waiting for it :slight_smile: One question, i wanted to connect Google Adwords API for our client and it says that it’s a SOAP one. Can it be used with Bubble?

Thanks,
Levon.

Founder at Bubblewits - Bubble Certified Partner

http://bubblestore.io – a place to buy Bubble templates for landing pages, e-commerce, workflows, APIs etc.
http://iambubble.com - one page Bubble demo
http://builtonbubble.com - Collection of apps built on Bubble

1 Like

Hey @emmanuel

Any plans to have bubble be the authenticator. For example having bubble be the"Spotify" in your example above?

1 Like

I’m not sure, as quick search shows SOAP is XML-based, which is not going to work here. But I might be wrong. Did you try?

We already support this actually (if you see the App section in the API tab of the settings tab. If that’s of interest we can talk about it by email, at this stage we haven’t worked much on documentation for this yet.

1 Like

That’s right Google Adwords says that it’s SOAP XML API, i didn’t try yet because i wanted to know first if it’s supported… Do you think it’s worth trying or you are certain that it won’t work?

Thanks,
Levon

If it’s XML based it won’t work. The API connector is JSON

1 Like

Thanks @emmanuel

I will reach out when I am ready. In a week or so.

Just read the announcement, and this is HUGE !

Proof that there is a GOD :grinning: and my prayers have been answered.

Will test it out and see what happens :slight_smile:

3 Likes

This is awesome! For existing plugins like Facebook + Twitter, is there a way to get the Oauth access tokens from the existing authentication flow and use them? Or should we build separate flows using the new connector?

1 Like

You should build a separate flow (but can use the same keys). Users will have to authenticate once.

Worth mentioning that it won’t work without the debugger on :blush:

1 Like