# The API call returns a non-object and you picked JSON

**URL:** <https://forum.bubble.io/t/the-api-call-returns-a-non-object-and-you-picked-json/142461>\
**Category:** APIs\
**Created:** [March 22, 2021, 2:58pm UTC](https://forum.bubble.io/t/the-api-call-returns-a-non-object-and-you-picked-json/142461 "2021-03-22T14:58:14Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![andreg.diniz97](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/andreg.diniz97/32/89340_2.png) [@andreg.diniz97](https://forum.bubble.io/u/andreg.diniz97)\
**Post date:** [March 22, 2021, 2:58pm UTC](https://forum.bubble.io/t/the-api-call-returns-a-non-object-and-you-picked-json/142461/1 "2021-03-22T14:58:14Z")

</div>

Hi guys,

I’m trying to use the “API connector” plugin, but it returns the error below:

 ![2](https://us1.discourse-cdn.com/bubble/original/3X/9/3/933d6d7944d9edf575dce3396eef9ce3ea26872b.png)

I’m using these settings in the plugin:

 ![1](https://us1.discourse-cdn.com/bubble/original/3X/1/b/1b6e93335dc0740f5e53ee9e12bb9846f8d49b82.png)

I call the API through this link: [https://api.bcb.gov.br/dados/serie/bcdata.sgs.22940/dados?formato=json&dataInicial=01/01/2010&dataFinal=31/12/2016](https://api.bcb.gov.br/dados/serie/bcdata.sgs.22940/dados?formato=json&dataInicial=01/01/2010&dataFinal=31/12/2016)

Which returns me a string of objects, just like the example below:

 ![3](https://us1.discourse-cdn.com/bubble/original/3X/a/9/a9f65abea5764ce57fe9e97ff2509866a6b100fc.png)

What can I be doing to resolve this issue?

---

<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:** [March 22, 2021, 3:11pm UTC](https://forum.bubble.io/t/the-api-call-returns-a-non-object-and-you-picked-json/142461/3 "2021-03-22T15:11:46Z")

</div>

Add an header  
key: User-Agent  
value: bubble/yourapp  
(You can enter what you want in value).

---

<div class="post-metadata">

**Author:** ![jared.gibb](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jared.gibb/32/123329_2.png) [@jared.gibb](https://forum.bubble.io/u/jared.gibb)\
**Post date:** [March 22, 2021, 3:18pm UTC](https://forum.bubble.io/t/the-api-call-returns-a-non-object-and-you-picked-json/142461/4 "2021-03-22T15:18:06Z")

</div>

> [@andreg.diniz97](#):
>
> [https://api.bcb.gov.br/dados/serie/bcdata.sgs.22940/dados?formato=json&dataInicial=01/01/2010&dataFinal=31/12/2016](https://api.bcb.gov.br/dados/serie/bcdata.sgs.22940/dados?formato=json&dataInicial=01/01/2010&dataFinal=31/12/2016)

that works! I was having this issue recently, turned to postman and saw that header!

 ![Screen Shot 2021-03-22 at 11.17.37 AM](https://us1.discourse-cdn.com/bubble/original/3X/8/6/86aeb57fb62635d12c5488eab93a14d981a777a7.jpeg)

---

<div class="post-metadata">

**Author:** ![andreg.diniz97](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/andreg.diniz97/32/89340_2.png) [@andreg.diniz97](https://forum.bubble.io/u/andreg.diniz97)\
**Post date:** [March 22, 2021, 3:31pm UTC](https://forum.bubble.io/t/the-api-call-returns-a-non-object-and-you-picked-json/142461/5 "2021-03-22T15:31:29Z")

</div>

Thank you so much guys! Now it’s working. @Jici @jared.gibb

---

<div class="post-metadata">

**Author:** ![Alter345](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@Alter345](https://forum.bubble.io/u/Alter345)\
**Post date:** [September 20, 2021, 4:46pm UTC](https://forum.bubble.io/t/the-api-call-returns-a-non-object-and-you-picked-json/142461/6 "2021-09-20T16:46:29Z")

</div>

Hi there  
Im having the same issue  
i followed your advices @Jici @jared.gibb  
but impossible for me the data, the call is not working  
see the set up attached  
Am i missing something ?  
thanks

 ![Screen Shot 2021-09-20 at 18.44.21](https://us1.discourse-cdn.com/bubble/original/3X/e/b/ebe0311e90072ec5dd93a0e8c447bc7b3afa138c.png)  
 ![Screen Shot 2021-09-20 at 18.44.29](https://us1.discourse-cdn.com/bubble/original/3X/3/7/3777a9042843ddaa6c1ae37a8da4eac608229488.png)

---

<div class="post-metadata">

**Author:** ![jared.gibb](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jared.gibb/32/123329_2.png) [@jared.gibb](https://forum.bubble.io/u/jared.gibb)\
**Post date:** [September 20, 2021, 4:48pm UTC](https://forum.bubble.io/t/the-api-call-returns-a-non-object-and-you-picked-json/142461/7 "2021-09-20T16:48:27Z")

</div>

Are you able to get your api calls working in postman?

---

<div class="post-metadata">

**Author:** ![Alter345](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@Alter345](https://forum.bubble.io/u/Alter345)\
**Post date:** [September 20, 2021, 5:29pm UTC](https://forum.bubble.io/t/the-api-call-returns-a-non-object-and-you-picked-json/142461/8 "2021-09-20T17:29:33Z")

</div>

I did this (see attached)  
but not sure to have more informaiton ^^

 ![Screen Shot 2021-09-20 at 19.13.13](https://us1.discourse-cdn.com/bubble/original/3X/6/2/62198c65df1dd1c8cdab44e4cbb7001101f630cc.png)

---

<div class="post-metadata">

**Author:** ![jared.gibb](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jared.gibb/32/123329_2.png) [@jared.gibb](https://forum.bubble.io/u/jared.gibb)\
**Post date:** [September 20, 2021, 5:40pm UTC](https://forum.bubble.io/t/the-api-call-returns-a-non-object-and-you-picked-json/142461/9 "2021-09-20T17:40:46Z")

</div>

ok. click the headers tab here. there may be special headers there.  
does the call work from within postman?

---

<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:** [September 21, 2021, 12:06am UTC](https://forum.bubble.io/t/the-api-call-returns-a-non-object-and-you-picked-json/142461/10 "2021-09-21T00:06:55Z")

</div>

What I think you have is a bug in Bubble. you have probably deleted or modify an header and in some case, this will create an issue. Can you start from a fresh new API Call to see if you have this error back?

---

<div class="post-metadata">

**Author:** ![Alter345](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@Alter345](https://forum.bubble.io/u/Alter345)\
**Post date:** [September 21, 2021, 11:18am UTC](https://forum.bubble.io/t/the-api-call-returns-a-non-object-and-you-picked-json/142461/11 "2021-09-21T11:18:16Z")

</div>

@jared.gibb @Jici  
thank you for your replies  
I tried a call again  
now the issue is not the same but still a problem ^^

 ![Screen Shot 2021-09-21 at 13.16.14](https://us1.discourse-cdn.com/bubble/original/3X/7/b/7b1258d6e980a59bef464aabc8b79bfdf7b8109c.png)  
 ![Screen Shot 2021-09-21 at 13.15.56](https://us1.discourse-cdn.com/bubble/original/3X/b/7/b78713ac7540c5d5bc8f3aa86011ca20438ec3b9.png)

---

<div class="post-metadata">

**Author:** ![jared.gibb](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jared.gibb/32/123329_2.png) [@jared.gibb](https://forum.bubble.io/u/jared.gibb)\
**Post date:** [September 21, 2021, 11:19am UTC](https://forum.bubble.io/t/the-api-call-returns-a-non-object-and-you-picked-json/142461/12 "2021-09-21T11:19:37Z")

</div>

Change your data type to the appropriate response? Maybe it’s not a json?

Try text

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/f/e/fea0f4194218f1cc0eccb2ddfc28748d885f54a0.jpeg)

---

<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:** [September 21, 2021, 11:25am UTC](https://forum.bubble.io/t/the-api-call-returns-a-non-object-and-you-picked-json/142461/13 "2021-09-21T11:25:37Z")

</div>

You are calling Integromat and by default, Integromat will return a text. You need to change to text OR add Webhook response in your Integromat scenario

---

<div class="post-metadata">

**Author:** ![Alter345](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@Alter345](https://forum.bubble.io/u/Alter345)\
**Post date:** [September 21, 2021, 11:30am UTC](https://forum.bubble.io/t/the-api-call-returns-a-non-object-and-you-picked-json/142461/14 "2021-09-21T11:30:18Z")

</div>

Thanks i will try guys  
I guess I will check on thursday.  
Not sure BTW that with the text format I can get the right datas  
I ll let you know  
Many thanks !

---

<div class="post-metadata">

**Author:** ![Alter345](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@Alter345](https://forum.bubble.io/u/Alter345)\
**Post date:** [September 21, 2021, 1:51pm UTC](https://forum.bubble.io/t/the-api-call-returns-a-non-object-and-you-picked-json/142461/15 "2021-09-21T13:51:28Z")

</div>

@Jici @jared.gibb Ok it works when i turn it into text.  
However, it’s not ideal to manipulate datas with integromat as text but i will figure out a solution.  
Many thanks for your help !

---

<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:** [September 21, 2021, 2:52pm UTC](https://forum.bubble.io/t/the-api-call-returns-a-non-object-and-you-picked-json/142461/16 "2021-09-21T14:52:16Z")

</div>

Can you share screenshot of your integromat scenario?

---

<div class="post-metadata">

**Author:** ![Alter345](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@Alter345](https://forum.bubble.io/u/Alter345)\
**Post date:** [September 22, 2021, 6:45am UTC](https://forum.bubble.io/t/the-api-call-returns-a-non-object-and-you-picked-json/142461/17 "2021-09-22T06:45:11Z")

</div>

Yes 😉  
I did a split function, and it works, since it cut differents emails adress

 ![Screen Shot 2021-09-22 at 08.44.25](https://us1.discourse-cdn.com/bubble/original/3X/2/2/2297a22051eee9eeac20bc4311d43fec375bd33a.png)

---

<div class="post-metadata">

**Author:** ![jared.gibb](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jared.gibb/32/123329_2.png) [@jared.gibb](https://forum.bubble.io/u/jared.gibb)\
**Post date:** [September 22, 2021, 10:47am UTC](https://forum.bubble.io/t/the-api-call-returns-a-non-object-and-you-picked-json/142461/18 "2021-09-22T10:47:59Z")

</div>

looks like you’re using it as a trigger to send emails? What would you expect it to return?

---

<div class="post-metadata">

**Author:** ![93bulletsb](https://avatars.discourse-cdn.com/v4/letter/9/8dc957/32.png) [@93bulletsb](https://forum.bubble.io/u/93bulletsb)\
**Post date:** [May 11, 2022, 3:35pm UTC](https://forum.bubble.io/t/the-api-call-returns-a-non-object-and-you-picked-json/142461/19 "2022-05-11T15:35:36Z")

</div>

So I am struggling with the same thing here

 ![Screenshot 2022-05-11 at 8.56.39 PM](https://us1.discourse-cdn.com/bubble/original/3X/4/4/443ef7ced85af07ad455435ef8b438f979e8b9ac.png)

Thats my api set up. It works in Postman. My return in text looks like this-

 ![Screenshot 2022-05-11 at 9.04.14 PM](https://us1.discourse-cdn.com/bubble/original/3X/4/5/45a35684625ad65b4d1e8506cdf7696d27371f68.png)

But JSON is the same non object type thing.

I tried the headers from postman but that didnt work.

Its a list of json objects, each with its own set of key value pairs.
