Skip to content

Get a file access token

post/get-sas-token
Any key

Generate a read-only Shared Access Signature (SAS) token for accessing a specific uploaded file.

Request body

Sending 2 of 2 fields
Required
chatbotIdstring
The unique identifier allocated to the chatbot.
fileUrlstring
The URL of the file to generate a SAS token for.

Only these fields are sent (application/json).

Try it · POST /get-sas-token
curl 'https://api.chat-data.com/api/v2/get-sas-token' \  -H "Authorization: Bearer $CHAT_DATA_API_KEY" \  -H 'Content-Type: application/json' \  -d '{  "chatbotId": "6650f1c2a9e4b83d2c7a1f05",  "fileUrl": "https://example.blob.core.windows.net/chatfiles/6650f1c2a9e4b83d2c7a1f05/product-handbook.pdf"}'
Loading…

Responses

Successful response. For a file that does not exist, sasToken is empty and url ends with ?.

Content type: application/json

FieldDescription
statusstringOne of: success.
urlstringThe complete file URL with the new SAS token.
sasTokenstringThe generated read-only SAS token.

Example

{  "status": "success",  "url": "https://example.blob.core.windows.net/chatfiles/6650f1c2a9e4b83d2c7a1f05/product-handbook.pdf?sv=2024-11-04&se=2026-11-13T09%3A30%3A00Z&sr=b&sp=r&sig=Xq7mB2v9KpL4tR8wN1cZ5yF3hJ6dS0aE%2BuG7iO2kQ%3D",  "sasToken": "sv=2024-11-04&se=2026-11-13T09%3A30%3A00Z&sr=b&sp=r&sig=Xq7mB2v9KpL4tR8wN1cZ5yF3hJ6dS0aE%2BuG7iO2kQ%3D"}

Last updated October 14, 2026