# API sending PDF issue

**URL:** <https://forum.bubble.io/t/api-sending-pdf-issue/288310>\
**Category:** APIs\
**Created:** [October 15, 2023, 5:37pm UTC](https://forum.bubble.io/t/api-sending-pdf-issue/288310 "2023-10-15T17:37:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sjef](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@sjef](https://forum.bubble.io/u/sjef)\
**Post date:** [October 15, 2023, 5:37pm UTC](https://forum.bubble.io/t/api-sending-pdf-issue/288310/1 "2023-10-15T17:37:43Z")

</div>

I’m trying to send a PDF via the API Connecter. All the API calls to the other app work, only sending the PDF isn’t. I did it via Postman and it worked fine, with the same settings.  
According the other side, the issue is:  
" Bubble API probably aren’t processing files bytes like postman did. Our api endpoint is expecting the file bytes should start with this format “%PDF” or “\<?xml” "  
Could anyone tell me what I should change here? Below is the screenshot of the API Request:

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

---

<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:** [October 17, 2023, 12:00am UTC](https://forum.bubble.io/t/api-sending-pdf-issue/288310/2 "2023-10-17T00:00:23Z")

</div>

I would guess it’s about sending the file as a file. Any reason you can’t send the S3 url for the file?

---

<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:** [October 17, 2023, 12:11am UTC](https://forum.bubble.io/t/api-sending-pdf-issue/288310/3 "2023-10-17T00:11:27Z")

</div>

In Postman are you sending the file as form-data, or are you sending it as binary data like this?

 ![Screenshot_7](https://us1.discourse-cdn.com/bubble/original/3X/a/2/a2b568728ab9c62786dd8c549669dadb04900411.jpeg)

And make sure all your headers are the same, even check the default/hidden ones Postman adds and see if any of those need to be added to Bubble.

If its form-data you probably have it correct in Bubble, but binary data is more tricky and not do-able w/ the API Connector

---

<div class="post-metadata">

**Author:** ![sjef](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@sjef](https://forum.bubble.io/u/sjef)\
**Post date:** [October 17, 2023, 8:44pm UTC](https://forum.bubble.io/t/api-sending-pdf-issue/288310/4 "2023-10-17T20:44:16Z")

</div>

It’s indeed binary.  
So is there any solution for this outside of the API connector?  
As I’m afraid I cannot change it at the receiving side (an external provider)
