I have an api endpoint that only accepts videos in the format of binary data types. Ive tried my calls with postman and it works with the binary file data entry as show. But when I try to integrate this into my project with bubble I don’t know how to send binary files. It only shows json, raw form and raw. Anyone know what I can do to get around this? How can I send a video in binary with this API request?
Hi, did you check other threads similar to you to send binary data. There are several posts you can read that match your case. You can also see this thread from zeroqode
The way I solved this problem is by using the toolbox plugin and making a custom JavaScript file that sends the information rather than through bubble api. I used chatgpt to make a function that temporarily downloads a video locally and sends it to the api endpoint. It worked like magic. Hope this helps
That’s super helpful to know! Thank you @mikepowersofficial . Would you be willing to show the JS code that accomplishes that? That would be a huge help.
I don’t have the code unfortunately I deleted that project lol. But it was for posting videos on YouTube. When you post via api, it gives you a link to upload the binary file. This means you never have to expose your keys just send the binary video request to the endpoint, from the link you got in the first request. I’m not to sure about other platforms though.
Hey Mike, would you mind showing how you made your upload call to YouTube using the API connector? Doesn’t have to be the whole OAuth2 process, just the one “video insert” call. I keep running into issues making the call, so seeing how you set it up would be a tremendous help if possible. I’m looking to integrate YouTube posting into my app now that I got binary API calls working!