Images

You can use the API to get or upload images.

post
Upload a user image

https://api.tiledesk.com/v2/images/users
Allows to upload an image with autentication
Request
Response
Request
Headers
Authorization
required
string
authorization token. Basic Auth or JWT
Content-Type
required
string
use "multipart/form-data" value
Body Parameters
file
required
binary
the image binary file
Response
200: OK
{
"message":"File uploded successfully",
"filename":"uploads/users/5ebd890292befe0019054973/images/392224bb-0b1e-46b7-a131-183353be7645/test.jpg"
}

Example:

curl -v -X POST -H 'Content-Type: multipart/form-data' -u [email protected]:123456 -F "[email protected]/Users/andrealeo/dev/chat21/tiledesk-server-dev-org/test.jpg" https://api.tiledesk.com/v2/images/users

get
Get the image binary by filename path

https://api.tiledesk.com/v2/images
Request
Response
Request
Headers
Authorization
required
string
authorization token. Basic Auth or JWT
Query Parameters
path
required
string
the image path in the repository
Response
200: OK
<binary>

Example

curl -v -X GET -H -u [email protected]:123456 https://api.tiledesk.com/v2/images?path=uploads/users/5ebd890292befe0019054973/images/392224bb-0b1e-46b7-a131-183353be7645/test.jpg