# HTTP post form problem

**URL:** <https://community.homey.app/t/http-post-form-problem/109286>\
**Category:** Questions & Help\
**Tags:** homey-pro, logic\
**Created:** [May 3, 2024, 6:59pm UTC](https://community.homey.app/t/http-post-form-problem/109286 "2024-05-03T18:59:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![DimitriEbben](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dimitriebben/32/42826_2.png) [@DimitriEbben](https://community.homey.app/u/DimitriEbben)\
**Post date:** [May 3, 2024, 6:59pm UTC](https://community.homey.app/t/http-post-form-problem/109286/1 "2024-05-03T18:59:42Z")

</div>

Does anyone have experience with the Homey HTTP POST form? I want to send an image to an API, but so far, I’m unable to connect to the API. (I removed the actual API data from the pictures.) What do I need to adjust to access the API and get a response?

(This API is not used for detect faces like the face++ app, but for skeleton detection. This is a detection of human body’s in a image).

Link to the API:

> **[Face⁺⁺](https://console.faceplusplus.com/documents/37664553)**
>
> Megvii Tech III

 ![IMG_4519](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/b/ab3353205100ae1e3288e0a62a0ca1c9cf048c0f.png)

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [May 3, 2024, 11:32pm UTC](https://community.homey.app/t/http-post-form-problem/109286/2 "2024-05-03T23:32:22Z")

</div>

Try the logic card?

 ![Screenshot_20240504-013126_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/2/924b8f9deba1887c2f1fa17cfaf8cde6e6309a10.jpeg)

---

<div class="post-metadata">

**Author:** ![DimitriEbben](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dimitriebben/32/42826_2.png) [@DimitriEbben](https://community.homey.app/u/DimitriEbben)\
**Post date:** [May 4, 2024, 7:52am UTC](https://community.homey.app/t/http-post-form-problem/109286/3 "2024-05-04T07:52:31Z")

</div>

Hi Peter,

Thanks for your response. I’ve tried that too, but I still can’t get it to work (see images). Do you have any idea what I should change? I think something’s going wrong with the header and body, but I have no idea what.

 ![IMG_4514](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/9/69fc3ac993683fa047e7986470733c7ed61dc21a.png)  
 ![IMG_4515](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/3/835aec5938ee4811657afa5d717ab1adffe6742a.png)

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [May 4, 2024, 8:28pm UTC](https://community.homey.app/t/http-post-form-problem/109286/4 "2024-05-04T20:28:25Z")

</div>

Hi Dimitri,

I forgot about something: I think you should use advanced flow to be able to use the response & status code tag in a timeline card

After lots of trial and error, I got it working with an image\_url:

![Screenshot from 2024-05-04 22-16-50](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/9/59496fffb06e20c469ba928650a3ae91595aa013.png)

```auto
https://api-us.faceplusplus.com/humanbodypp/v2/segment?api_key=mykey&api_secret=mysecret&image_url=https://i.scdn.co/image/ab67616d0000b2736c9edead25c8dfda97e778ab

```

.  
And you´d use these headers for local image file upload:  
`Content-Type: multipart/form-data`  
But I still get errors when I want to use a local image file, I give up on that one  
(I’m aware of the  
Image Requirements  
Format : JPG (JPEG), PNG  
Size : between 48\*48 and 1280\*1280 (pixels)  
File size : max 2MB  
)

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [May 5, 2024, 4:53am UTC](https://community.homey.app/t/http-post-form-problem/109286/5 "2024-05-05T04:53:01Z")

</div>

> [@Peter\_Kawa](#):
>
> And you´d use these headers for local image file upload:  
> `Content-Type: multipart/form-data`

That’s not something Homey (or any of its apps) support.

---

<div class="post-metadata">

**Author:** ![DimitriEbben](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dimitriebben/32/42826_2.png) [@DimitriEbben](https://community.homey.app/u/DimitriEbben)\
**Post date:** [May 5, 2024, 8:48am UTC](https://community.homey.app/t/http-post-form-problem/109286/6 "2024-05-05T08:48:35Z")

</div>

Hi Peter,  
Thanks a lot, you’ve been a great help. I’m finally getting a response back from the API. Sending an image is now the next challenge.

---

<div class="post-metadata">

**Author:** ![DimitriEbben](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dimitriebben/32/42826_2.png) [@DimitriEbben](https://community.homey.app/u/DimitriEbben)\
**Post date:** [May 5, 2024, 8:50am UTC](https://community.homey.app/t/http-post-form-problem/109286/7 "2024-05-05T08:50:26Z")

</div>

@robertklep Thanks for your reply! Do you have any idea or tip on how I can send a local image from Homey through the API, ensuring it meets the API’s requirements?

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [May 5, 2024, 9:46am UTC](https://community.homey.app/t/http-post-form-problem/109286/8 "2024-05-05T09:46:13Z")

</div>

> [@DimitriEbben](#):
>
> Do you have any idea or tip on how I can send a local image from Homey through the API, ensuring it meets the API’s requirements?

The only way that could work is if you can determine a publicly accessible URL for the image, and I’m not sure that even exists.
