Recent searches


No recent searches

Upload file optional token purpose



Posted Nov 19, 2021

https://developer.zendesk.com/api-reference/ticketing/tickets/ticket-attachments/#upload-files

The curl example shows a token parameter:
curl "https://{subdomain}.zendesk.com/api/v2/uploads?filename=user_crash.log&token={optional_token}"

What is the purpose of this parameter and what value should it take?


0

2

2 comments

image avatar

Erica Girges

Zendesk Developer Advocacy

Hi Pavel,
 
Thank you so much for posting your question! So when multiple files need to be uploaded with the same request. It is handled by the request being divided into multiple requests (1 request per 1 file). The first request that goes through will generate an API token. That unique token will then be what is passed into the token parameter for the subsequent requests. This ensures that each file upload is still associated with that initial request. The API token is the equivalent of stapling/paper clipping documents together. Each paper has its own information but they still all belong together and we don't want anything to get lost along the way. Passing in the API token does just that by connecting each file upload with each other.
 
Hope this helps!
 
Best,
 
Erica - Dev Support

1


Erica Girges is there any practical reason why we should do this? Does the ticket comment API not allow multiple file tokens to be attached to the same ticket comment?

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post