# Bubble API connector issue

**URL:** <https://forum.bubble.io/t/bubble-api-connector-issue/106004>\
**Category:** APIs\
**Created:** [August 12, 2020, 1:24pm UTC](https://forum.bubble.io/t/bubble-api-connector-issue/106004 "2020-08-12T13:24:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![phaproduction](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@phaproduction](https://forum.bubble.io/u/phaproduction)\
**Post date:** [August 12, 2020, 1:24pm UTC](https://forum.bubble.io/t/bubble-api-connector-issue/106004/1 "2020-08-12T13:24:54Z")

</div>

Hi,

I’ve wanted to authenticate through the Bubble API connector for the past ~3 days. I honestly don’t know where the issue could be. I am connecting to the Robinhood API for authentication.

Here is the setup of the API plugin:

 ![api](https://us1.discourse-cdn.com/bubble/original/3X/1/a/1a962a3f6a083cabec826a6503a7e925401b7b59.jpeg)

Unforunately, I get a **{“detail”:“Unsupported media type "" in request.”}** error when Initializing the call.

What is causing me sleepless nights is the fact that I am able to authenticate without issues, with the same JSON code and API URL:

 ![api_2](https://us1.discourse-cdn.com/bubble/original/3X/c/9/c9641b17138915775bc95d4e1c965d56bb572f7e.jpeg)

Is there anything I have to do differently in the Bubble API Plugin?

---

<div class="post-metadata">

**Author:** ![shawnmi6](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/shawnmi6/32/96625_2.png) [@shawnmi6](https://forum.bubble.io/u/shawnmi6)\
**Post date:** [August 12, 2020, 2:04pm UTC](https://forum.bubble.io/t/bubble-api-connector-issue/106004/2 "2020-08-12T14:04:46Z")

</div>

Add a header to your api call  
“content-type” application/json

---

<div class="post-metadata">

**Author:** ![phaproduction](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@phaproduction](https://forum.bubble.io/u/phaproduction)\
**Post date:** [August 12, 2020, 2:08pm UTC](https://forum.bubble.io/t/bubble-api-connector-issue/106004/3 "2020-08-12T14:08:57Z")

</div>

> [@shawnmi6](#):
>
> content-type

Thanks - when I do that, I get an error:

> Status code 401  
> {“error”:“invalid\_client”}

And while this would seem like the problem is with the client\_id, I have confirmed mutliple times that that Id is correct and am able to connect with the exact same code via other API connectors

---

<div class="post-metadata">

**Author:** ![shawnmi6](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/shawnmi6/32/96625_2.png) [@shawnmi6](https://forum.bubble.io/u/shawnmi6)\
**Post date:** [August 12, 2020, 2:13pm UTC](https://forum.bubble.io/t/bubble-api-connector-issue/106004/4 "2020-08-12T14:13:49Z")

</div>

Try to use your own Basic Auth instead of Bubbles built-in one.

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [August 12, 2020, 3:59pm UTC](https://forum.bubble.io/t/bubble-api-connector-issue/106004/5 "2020-08-12T15:59:56Z")

</div>

That’s sound strange to me that you are calling an oAuth2 token endpoint with a basic auth. I think there’s an issue there.  
Can you provide link to API Doc?

I think you should use Custom oAuth token but I’m not sure.

---

<div class="post-metadata">

**Author:** ![phaproduction](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@phaproduction](https://forum.bubble.io/u/phaproduction)\
**Post date:** [August 12, 2020, 5:59pm UTC](https://forum.bubble.io/t/bubble-api-connector-issue/106004/6 "2020-08-12T17:59:29Z")

</div>

> [@Jici](#):
>
> Custom oAuth

Unfortunately there is no official documentation.  
I was writing a long post explaining why I am using basic auth but you sir, are right and this solved my issue.

I am an idiot. Thank you very much
