# \[New Feature - Beta\] API Connector and OAuth2 APIs

**URL:** <https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294>\
**Category:** New features\
**Created:** [September 23, 2016, 5:35pm UTC](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294 "2016-09-23T17:35:50Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![emmanuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/emmanuel/32/27657_2.png) [@emmanuel](https://forum.bubble.io/u/emmanuel)\
**Post date:** [September 23, 2016, 5:35pm UTC](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294/1 "2016-09-23T17:35:51Z")

</div>

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 🙂 See below what it looks like for Spotify.

 ![](https://us1.discourse-cdn.com/bubble/original/2X/0/050fb01cb42c8264cba305837efcffe145a1561d.png)

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](https://bubble.io/bug_report).

---

<div class="post-metadata">

**Author:** ![romanmg](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/romanmg/32/237672_2.png) [@romanmg](https://forum.bubble.io/u/romanmg)\
**Post date:** [September 23, 2016, 5:48pm UTC](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294/2 "2016-09-23T17:48:57Z")

</div>

This is a BLESSING for [Usercard](http://usercard.org)

I am so excited. Thank you thank you!!

---

<div class="post-metadata">

**Author:** ![natedogg](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/natedogg/32/79328_2.png) [@natedogg](https://forum.bubble.io/u/natedogg)\
**Post date:** [September 23, 2016, 5:49pm UTC](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294/3 "2016-09-23T17:49:43Z")

</div>

This is a game changer!

---

<div class="post-metadata">

**Author:** ![emmanuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/emmanuel/32/27657_2.png) [@emmanuel](https://forum.bubble.io/u/emmanuel)\
**Post date:** [September 23, 2016, 5:52pm UTC](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294/4 "2016-09-23T17:52:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [September 23, 2016, 7:52pm UTC](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294/5 "2016-09-23T19:52:19Z")

</div>

Nice 🙂

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](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](https://www.googleapis.com/auth/plus.login) as a scope, and now I get what looks like a better URL …

> **[Bubble - Visual Programming](https://trest3.bubbleapps.io/version-test/googlelogin?authuser=0&session_state=fb76f3f38bb5eb3e10a13bac0161f4568278a00b..fff9&prompt=none)**
>
> Build stuff without code and launch a startup without a tech-cofounder! Bubble is a visual programing language. Instead of typing code, use a visual editor to build applications.

But still not valid ?

---

<div class="post-metadata">

**Author:** ![emmanuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/emmanuel/32/27657_2.png) [@emmanuel](https://forum.bubble.io/u/emmanuel)\
**Post date:** [September 23, 2016, 8:06pm UTC](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294/6 "2016-09-23T20:06:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [September 23, 2016, 8:19pm UTC](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294/7 "2016-09-23T20:19:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![emmanuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/emmanuel/32/27657_2.png) [@emmanuel](https://forum.bubble.io/u/emmanuel)\
**Post date:** [September 23, 2016, 8:25pm UTC](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294/8 "2016-09-23T20:25:01Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [September 24, 2016, 5:34am UTC](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294/9 "2016-09-24T05:34:59Z")

</div>

Ohhhh, I see now 🙂

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

---

<div class="post-metadata">

**Author:** ![levon](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/levon/32/89793_2.png) [@levon](https://forum.bubble.io/u/levon)\
**Post date:** [September 24, 2016, 9:58am UTC](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294/10 "2016-09-24T09:58:18Z")

</div>

This is great news, Emmanuel, we’ve been waiting for it 🙂 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.  
 ![](https://us1.discourse-cdn.com/bubble/original/2X/0/0e27c966ced69bb42d00c2f85261d96fc8e34342.png)

Founder at Bubblewits - Bubble Certified Partner

> **[Zeroqode is a suite of no-code products and services for launching your ideas...](https://zeroqode.com)**
>
> No-code apps, plugins for Bubble, native apps builder and more. Now you can build apps without code even faster

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

---

<div class="post-metadata">

**Author:** ![AliFarahat](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/alifarahat/32/189604_2.png) [@AliFarahat](https://forum.bubble.io/u/AliFarahat)\
**Post date:** [September 24, 2016, 10:20am UTC](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294/11 "2016-09-24T10:20:09Z")

</div>

Hey @emmanuel

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

---

<div class="post-metadata">

**Author:** ![emmanuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/emmanuel/32/27657_2.png) [@emmanuel](https://forum.bubble.io/u/emmanuel)\
**Post date:** [September 24, 2016, 5:24pm UTC](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294/12 "2016-09-24T17:24:33Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![emmanuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/emmanuel/32/27657_2.png) [@emmanuel](https://forum.bubble.io/u/emmanuel)\
**Post date:** [September 24, 2016, 5:25pm UTC](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294/13 "2016-09-24T17:25:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![levon](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/levon/32/89793_2.png) [@levon](https://forum.bubble.io/u/levon)\
**Post date:** [September 24, 2016, 7:01pm UTC](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294/14 "2016-09-24T19:01:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![emmanuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/emmanuel/32/27657_2.png) [@emmanuel](https://forum.bubble.io/u/emmanuel)\
**Post date:** [September 24, 2016, 7:03pm UTC](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294/15 "2016-09-24T19:03:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![AliFarahat](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/alifarahat/32/189604_2.png) [@AliFarahat](https://forum.bubble.io/u/AliFarahat)\
**Post date:** [September 24, 2016, 10:15pm UTC](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294/16 "2016-09-24T22:15:08Z")

</div>

Thanks @emmanuel

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

---

<div class="post-metadata">

**Author:** ![madras](https://avatars.discourse-cdn.com/v4/letter/m/85f322/32.png) [@madras](https://forum.bubble.io/u/madras)\
**Post date:** [September 25, 2016, 10:34am UTC](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294/17 "2016-09-25T10:34:48Z")

</div>

Just read the announcement, and this is HUGE !

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

Will test it out and see what happens 🙂

---

<div class="post-metadata">

**Author:** ![brentsum](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/brentsum/32/75304_2.png) [@brentsum](https://forum.bubble.io/u/brentsum)\
**Post date:** [September 28, 2016, 12:45am UTC](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294/18 "2016-09-28T00:45:16Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![emmanuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/emmanuel/32/27657_2.png) [@emmanuel](https://forum.bubble.io/u/emmanuel)\
**Post date:** [September 28, 2016, 5:18am UTC](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294/19 "2016-09-28T05:18:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [September 28, 2016, 5:26am UTC](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294/20 "2016-09-28T05:26:44Z")

</div>

> [@emmanuel](#):
>
> 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.

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

[Next page](https://forum.bubble.io/t/new-feature-beta-api-connector-and-oauth2-apis/6294.md?page=2)
