# Sending Binary Data through API Connector

**URL:** <https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933>\
**Category:** APIs\
**Created:** [September 6, 2023, 7:01pm UTC](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933 "2023-09-06T19:01:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidavellan](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/davidavellan/32/175839_2.png) [@davidavellan](https://forum.bubble.io/u/davidavellan)\
**Post date:** [September 6, 2023, 7:01pm UTC](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933/1 "2023-09-06T19:01:01Z")

</div>

So I have seen this question pop up a bunch but no definitive answers (or at least ones that worked for me).

I’m trying to send an image thumbnail to Vimeo following this guide: [Vimeo](https://developer.vimeo.com/api/upload/thumbnails#uploading-a-thumbnail-step-3)

I get stuck at step 3:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/5/f/5fb84973539606d9439a9cb142c63932ebf17c1b.png)

In postman, this is easy, as I can just set the request to binary and choose the file I want to upload. However, I am not sure how to pass that binary data or how to even format it to begin with in the API Connector plugin.

**I set the body type to raw,** and then passed the image file **encoded in base64** (using the bubble _encoded in base64_ file operation), using the **headers:**  
Content-Type: image/jpeg  
Accept: application/vnd.vimeo.\*+json;version=3.4.

This results in a failure 400 bad request.

My question, is it even possible to send this binary data using the API connector? I’m thinking not as it is, and a quick search doesn’t show me any plugins that could allow this. So I’m thinking I have to find another way of getting that binary data through.

What would be the best way to accomplish this? This is a trivial thing that for my app is only needed for this one thing (to upload a thumbnail), so I am trying to avoid overcomplicating the process, lol.

---

<div class="post-metadata">

**Author:** ![code-escapee](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/code-escapee/32/195485_2.png) [@code-escapee](https://forum.bubble.io/u/code-escapee)\
**Post date:** [September 6, 2023, 8:40pm UTC](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933/2 "2023-09-06T20:40:40Z")

</div>

@davidavellan I may be missing something but assuming you’re converting the image into binary data and sending that file in the Bubble API Connector you should be good?

---

<div class="post-metadata">

**Author:** ![tylerboodman](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/tylerboodman/32/242142_2.png) [@tylerboodman](https://forum.bubble.io/u/tylerboodman)\
**Post date:** [September 6, 2023, 8:46pm UTC](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933/3 "2023-09-06T20:46:17Z")

</div>

> [@code-escapee](#):
>
> converting the image into binary data

That’s the part where you need a plugin or something.

@redvivi Might of had a solution I think?

I have never been able to get it working but I didn’t really need it, more was just experimenting.

> **[Bubble Back End Utilities Plugin for Bubble, by Aaron Sheldon](https://bubble.io/plugin/bubble-back-end-utilities-1620673970192x112120583001473020)**
>
> Bubble Back End Utilities Plugin page on Bubble, by Aaron Sheldon. Add Bubble Back End Utilities in one click to your app. Bubble lets you build web apps without any code.

Maybe “Read to Base 64” followed by a “Bytes from Base 64” action would work?

---

<div class="post-metadata">

**Author:** ![davidavellan](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/davidavellan/32/175839_2.png) [@davidavellan](https://forum.bubble.io/u/davidavellan)\
**Post date:** [September 6, 2023, 11:13pm UTC](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933/4 "2023-09-06T23:13:14Z")

</div>

Thanks for the tip. Unfortunately, that didn’t work. I had to choose a really small image to make it not timeout, (12kB gif), and was able to get it to output a list of numbers. I can format the list of numbers as a text, but that doesn’t work either. It’s a list of numbers from 0-255. I would guess binary data would mean a list of 0’s and 1’s, but I’m not sure how to pass that.

So I’m not sure if there is a way of formatting a string into a value that will be accepted as binary data into a raw body, or if the body type has to be set as binary (which we can’t do in the API connector).

I’m wondering if there would be a way if running a cURL request using javascript or going about this in another fashion.

---

<div class="post-metadata">

**Author:** ![tylerboodman](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/tylerboodman/32/242142_2.png) [@tylerboodman](https://forum.bubble.io/u/tylerboodman)\
**Post date:** [September 7, 2023, 5:01pm UTC](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933/7 "2023-09-07T17:01:40Z")

</div>

If anyone stumbles across this thread, I ended up making a private plugin for @davidavellan that directly makes the API call with the binary data in a server-side action.

We found the API connector was modifying the binary data somehow before it was getting sent out.

DM me w/ your app name if you need the plugin 🙂

---

<div class="post-metadata">

**Author:** ![davidavellan](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/davidavellan/32/175839_2.png) [@davidavellan](https://forum.bubble.io/u/davidavellan)\
**Post date:** [September 7, 2023, 7:14pm UTC](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933/8 "2023-09-07T19:14:11Z")

</div>

Thank you Tyler! Works like a charm 😀

---

<div class="post-metadata">

**Author:** ![douglas\_unr](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/douglas_unr/32/105747_2.png) [@douglas\_unr](https://forum.bubble.io/u/douglas_unr)\
**Post date:** [December 13, 2023, 1:26pm UTC](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933/9 "2023-12-13T13:26:48Z")

</div>

Hey, my friend!

I’m having this same issue, would be able to send me that plugin? i would reaaaally appreciate it, I’ve tried and everything and I can’t get it working.

thank you

---

<div class="post-metadata">

**Author:** ![verdier.developpement](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@verdier.developpement](https://forum.bubble.io/u/verdier.developpement)\
**Post date:** [March 15, 2024, 8:42am UTC](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933/10 "2024-03-15T08:42:34Z")

</div>

Hello,  
Same here, trying to upload a picture on Sharepoint using the Graph API, but content need to be binary data… Can you help me or give access to the plugin ?

Many thanks !

---

<div class="post-metadata">

**Author:** ![suporte6](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@suporte6](https://forum.bubble.io/u/suporte6)\
**Post date:** [April 3, 2024, 12:39pm UTC](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933/11 "2024-04-03T12:39:40Z")

</div>

Hello, @tylerboodman! Do you mind sending me the plugin? It would be of great help, my friend. I really need to send binary data to set up an API Call for uploading videos to Dropbox

---

<div class="post-metadata">

**Author:** ![GH5T](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/gh5t/32/209141_2.png) [@GH5T](https://forum.bubble.io/u/GH5T)\
**Post date:** [April 3, 2024, 1:10pm UTC](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933/12 "2024-04-03T13:10:50Z")

</div>

This might do this trick: [FileToBinary by GhostCodes Plugin | Bubble](https://bubble.io/plugin/filetobinary-by-ghostcodes-1688419749563x386340954085523460)

If not lmk and I’ll try to rework it. Otherwise I’m sure @tylerboodman will get back to you guys.

Or does it need to be the other way around? If so I can add that functionality I’m sure.

---

<div class="post-metadata">

**Author:** ![suporte6](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@suporte6](https://forum.bubble.io/u/suporte6)\
**Post date:** [April 3, 2024, 9:04pm UTC](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933/14 "2024-04-03T21:04:29Z")

</div>

Hi, @GH5T! Thank you so much for the plugin. I was able to make the API Call initialize and run on a workflow, but the video file im uploading to dropbox is being uploaded corrupted. Im not sure what’s happening in the conversion to binary, but I know something wrong is going on because the file size being shown on Dropbox is not equal the file size on my computer

---

<div class="post-metadata">

**Author:** ![GH5T](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/gh5t/32/209141_2.png) [@GH5T](https://forum.bubble.io/u/GH5T)\
**Post date:** [April 3, 2024, 9:34pm UTC](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933/15 "2024-04-03T21:34:02Z")

</div>

How big is your file?

---

<div class="post-metadata">

**Author:** ![suporte6](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@suporte6](https://forum.bubble.io/u/suporte6)\
**Post date:** [April 3, 2024, 10:56pm UTC](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933/16 "2024-04-03T22:56:35Z")

</div>

not large, 3 mb.

---

<div class="post-metadata">

**Author:** ![dualpixel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dualpixel/32/160375_2.png) [@dualpixel](https://forum.bubble.io/u/dualpixel)\
**Post date:** [April 4, 2024, 2:28am UTC](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933/17 "2024-04-04T02:28:14Z")

</div>

Hi, Tyler  
Same issues here.  
Please, could you send me the plugin?

App - [https://template-dualpixel.bubbleapps.io/](https://template-dualpixel.bubbleapps.io/)

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![tylerboodman](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/tylerboodman/32/242142_2.png) [@tylerboodman](https://forum.bubble.io/u/tylerboodman)\
**Post date:** [April 6, 2024, 8:12am UTC](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933/18 "2024-04-06T08:12:58Z")

</div>

Sure, I direct messaged you guys 🙂

---

<div class="post-metadata">

**Author:** ![GH5T](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/gh5t/32/209141_2.png) [@GH5T](https://forum.bubble.io/u/GH5T)\
**Post date:** [April 22, 2024, 9:50am UTC](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933/19 "2024-04-22T09:50:25Z")

</div>

Hi friends, have made an update on my current plugin.

Here is a link for you to get the latest File To Binary plugin from BubbleAppolis and also includes a demo to show how it all works.

> **[File To Binary - BuildAppolis | BuildAppolis](https://www.bappolis.com/plugin/file-to-binary)**
>
> Converts any file to a Binary String then returns it as a state or response. Client or Server.

Enjoy!

---

<div class="post-metadata">

**Author:** ![tysonzach86](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/tysonzach86/32/212239_2.png) [@tysonzach86](https://forum.bubble.io/u/tysonzach86)\
**Post date:** [April 22, 2024, 10:17am UTC](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933/20 "2024-04-22T10:17:13Z")

</div>

Hello there,

Thanks for sharing these insights mate as I found it very much useful and informative.

---

<div class="post-metadata">

**Author:** ![Dillon\_Schade](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dillon_schade/32/111070_2.png) [@Dillon\_Schade](https://forum.bubble.io/u/Dillon_Schade)\
**Post date:** [May 8, 2024, 10:01pm UTC](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933/21 "2024-05-08T22:01:15Z")

</div>

Hey Tyler,

I’m one of those guys who stumbled upon this. Do you think this will work for converting videos into binary? I’m setting up the [Bunny.net](http://Bunny.net) API for video streaming and stuck on the binary upload. Could you please send me that plugin?

Thanks man!

---

<div class="post-metadata">

**Author:** ![GH5T](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/gh5t/32/209141_2.png) [@GH5T](https://forum.bubble.io/u/GH5T)\
**Post date:** [May 8, 2024, 10:03pm UTC](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933/22 "2024-05-08T22:03:16Z")

</div>

My plugin has been updated. Maybe try that out? If not then I’m sure Tyler has your back.

---

<div class="post-metadata">

**Author:** ![Dillon\_Schade](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dillon_schade/32/111070_2.png) [@Dillon\_Schade](https://forum.bubble.io/u/Dillon_Schade)\
**Post date:** [May 8, 2024, 10:15pm UTC](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933/23 "2024-05-08T22:15:12Z")

</div>

Thanks for reaching out! I’m in the demo and tried with an MP4 file and this is the error I’m getting.

 ![Screenshot 2024-05-08 181359](https://us1.discourse-cdn.com/bubble/original/3X/7/a/7a955dc259fd139fdc39a3760e04d702241ed2d8.png)

Any thoughts if video binary is going to be a problem?

[Next page](https://forum.bubble.io/t/sending-binary-data-through-api-connector/281933.md?page=2)
