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:
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.
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:

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
)
1 Like
That’s not something Homey (or any of its apps) support.
1 Like
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.
1 Like
@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?
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.