0
Under review

Send image to API

ON 4 years ago updated by Praveen Srinivasaiah (Admin) 4 years ago 8

In my bot (for telegram) users can send a image to the bot (via input node). This image is stored in a image-variable. Now I want to call an API and send the image from this variable to the API. If I insert in the API only the variable (like {image01}), it doesn't work. How can I do that? Thank you for your help!

Under review

Here is the FAQ article which will help you understand on how to use an API and retrieve variables.


http://forum.onsequel.com/topics/140-how-do-i-use-an-api-node/

Yes, I saw that article but the thing is, that in my variable is an image. Not a text string.

When you create a variable, make sure to choose it as image variable. Then, retrieve this variable in the API.

I did that, of cause. 😐

What happened with this? Did it throw an error? Could you send me a screenshot or the link to your bot at onsequel.com where this is added?

https://www.onsequel.com/channels/15842/episodes/26879/trees/26872 Its the thing under "Witz einschicken" and "Lustiges Bild einschicken". Thank you for your help!

I've checked your bot and looks like the image variable works fine using it in the API. However, the API later throws an error. Could you please check if there is any issue with the API?

I've checked and looks like the error is thrown from API. You will need to check your API.


When yo test the API, click on "Open full response" and you will see the error which is why image variable is not retrieved.