Sending image using Images api call

I’m currently using Tiledesk API. Trying to find out how can I send images to the chat.

As far as I understood first of all I need to upload it via POST request at /images/users. It responds with file path starting with “uploads/users/…”. After that I guess I need to POST this path to the send message endpoint (/:project_id/requests/:request_id/messages), but it requires an absolute path of an image and the relative one doesn’t work.

Is there anything I’m missing here?

Hi razorbohan,

You can post your image to your favourite storage service. To send a message with an
image you can use the send message endpoint with adding a “metadata” section to the message
as described in the API endpoint documentation here:

https://developer.tiledesk.com/apis/rest-api/messages#send-a-message

in the metadata.src field place the absolute url of your image on your repository. width and height are optional attributes.

Hope this helps.

Andrea

I understand. But what is the purpose of /images/users API endpoint which allows to upload images somewhere?