# Getting a bad api string

**URL:** <https://forum.bubble.io/t/getting-a-bad-api-string/279130>\
**Category:** Plugin builders\
**Created:** [August 22, 2023, 12:42am UTC](https://forum.bubble.io/t/getting-a-bad-api-string/279130 "2023-08-22T00:42:51Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhenders1](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jhenders1](https://forum.bubble.io/u/jhenders1)\
**Post date:** [August 22, 2023, 12:42am UTC](https://forum.bubble.io/t/getting-a-bad-api-string/279130/1 "2023-08-22T00:42:52Z")

</div>

I am trying to push a list of numbers from my bubble workflow to a custom plugin I’m making

heres getting data: [Screenshot by Lightshot](https://prnt.sc/sV1kc-smCbam)

this is making it prettify but then when i push it though

> **[Screenshot](https://prnt.sc/_B6PGYZ_sd3k)**
>
> Captured with Lightshot

it gets the numbers as a string right now

then when I push the data into the plugin

> **[Screenshot](https://prnt.sc/UZyLXvtiZkkG)**
>
> Captured with Lightshot

the list it gets a bad json im just trying to get simple number list  
the plugin thinks its a string

> **[Screenshot](https://prnt.sc/Jq0dqBs3DyEG)**
>
> Captured with Lightshot

I have worked 8 hours straight on this. any help is great.

---

<div class="post-metadata">

**Author:** ![jhenders1](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jhenders1](https://forum.bubble.io/u/jhenders1)\
**Post date:** [August 22, 2023, 12:55am UTC](https://forum.bubble.io/t/getting-a-bad-api-string/279130/2 "2023-08-22T00:55:31Z")

</div>

I am trying to get an array of numbers inputted from an api

> **[Screenshot](https://prnt.sc/98-nlmdmMOHC)**
>
> Captured with Lightshot

not sure how to get the arrays input also any time i put through the data it comes as “{”\_class":“ListWrapper”,“query”:{“t”:“Static”,“data”:[" before the arrays.

---

<div class="post-metadata">

**Author:** ![jhenders1](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jhenders1](https://forum.bubble.io/u/jhenders1)\
**Post date:** [August 22, 2023, 12:59am UTC](https://forum.bubble.io/t/getting-a-bad-api-string/279130/3 "2023-08-22T00:59:07Z")

</div>

on the user side it copied the text fine as an array. its when I push it to my plugin its not working.

---

<div class="post-metadata">

**Author:** ![jhenders1](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jhenders1](https://forum.bubble.io/u/jhenders1)\
**Post date:** [August 22, 2023, 1:21am UTC](https://forum.bubble.io/t/getting-a-bad-api-string/279130/4 "2023-08-22T01:21:55Z")

</div>

this is the same data api call user view is perfect [Screenshot by Lightshot](https://prnt.sc/YiwnGy-NfItP)

---

<div class="post-metadata">

**Author:** ![jhenders1](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jhenders1](https://forum.bubble.io/u/jhenders1)\
**Post date:** [August 24, 2023, 3:14am UTC](https://forum.bubble.io/t/getting-a-bad-api-string/279130/5 "2023-08-24T03:14:10Z")

</div>

bump. LEt me know if anyone knows why its passing the data from any api as this

---

<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 24, 2023, 4:40am UTC](https://forum.bubble.io/t/getting-a-bad-api-string/279130/6 "2023-08-24T04:40:00Z")

</div>

The problem is that you don’t explain how you push the data (how the list of number is generated?). If your data is a list of text (number)… you can use :converted to number on this list.

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dorilama/32/226878_2.png) [@dorilama](https://forum.bubble.io/u/dorilama)\
**Post date:** [August 24, 2023, 6:02am UTC](https://forum.bubble.io/t/getting-a-bad-api-string/279130/7 "2023-08-24T06:02:10Z")

</div>

of course you know that `array=[bubblelist]` will not convert a bubble list in an array right? In your screenshot you are literally creating an array with one element that is a bubble list, the lenght will always be 1 and the array will not contain the valies of the list.  
Have you read [the docs](https://manual.bubble.io/account-and-marketplace/building-plugins/updating-to-plugin-api-v4)?

---

<div class="post-metadata">

**Author:** ![jhenders1](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jhenders1](https://forum.bubble.io/u/jhenders1)\
**Post date:** [September 6, 2023, 2:46pm UTC](https://forum.bubble.io/t/getting-a-bad-api-string/279130/8 "2023-09-06T14:46:03Z")

</div>

how can I convert it?

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dorilama/32/226878_2.png) [@dorilama](https://forum.bubble.io/u/dorilama)\
**Post date:** [September 6, 2023, 2:51pm UTC](https://forum.bubble.io/t/getting-a-bad-api-string/279130/9 "2023-09-06T14:51:12Z")

</div>

the documentation explains how to work with bubble lists. have a look at the link on my previous post.  
There is also inline documentations in the editor.  
Have a try with that first 🙃

---

<div class="post-metadata">

**Author:** ![jhenders1](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jhenders1](https://forum.bubble.io/u/jhenders1)\
**Post date:** [September 7, 2023, 11:21pm UTC](https://forum.bubble.io/t/getting-a-bad-api-string/279130/10 "2023-09-07T23:21:51Z")

</div>

no help yet, can’t pass json formatted array to server side plugin [bubble.io](http://bubble.io)

---

<div class="post-metadata">

**Author:** ![jhenders1](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@jhenders1](https://forum.bubble.io/u/jhenders1)\
**Post date:** [September 7, 2023, 11:23pm UTC](https://forum.bubble.io/t/getting-a-bad-api-string/279130/11 "2023-09-07T23:23:03Z")

</div>

not sure why its so hard to pass an array from api connector into an input in a workflow to do math on the array of numbers.

I want to plug in my dynamic data list of numbers into here

const historicalPrices = [1,5,6,7];

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dorilama/32/226878_2.png) [@dorilama](https://forum.bubble.io/u/dorilama)\
**Post date:** [September 8, 2023, 8:27am UTC](https://forum.bubble.io/t/getting-a-bad-api-string/279130/12 "2023-09-08T08:27:57Z")

</div>

> [@jhenders1](#):
>
> can’t pass json formatted array to server side plugin

A json formatted array is a string, which is different from an array which is different from a bubble list.

> [@jhenders1](#):
>
> not sure why its so hard to pass an array from api connector into an input in a workflow

It’s actually very easy, but you need to study the docs 🙃

This is the basic of plugin building in bubble and it looks like you still need to grasp it.  
A good way to learn how to deal with it is to work on a test plugin where you just play with passing different data types to the action. Again, the docs have everything you need to guide you.  
Once you grasp the basics you can move on implementing your logic.  
If you struggle saying “I tried but didn’t work” won’t help you. Try to post examples of what you tried and what was the unexpected result.  
Of course all this is assuming that you know js, if you don’t feel confident with it [freecodecamp](https://www.freecodecamp.org/) has good free learning resources.
