File Operations

Get a file access token

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

post/get-sas-token

Request

  • Base URL: https://api.chat-data.com/api/v2
  • URL: https://api.chat-data.com/api/v2/get-sas-token
  • Auth: HTTP bearer

Request body

chatbotIdstring required

The unique identifier allocated to the chatbot.

fileUrlstring required

The URL of the file to generate a SAS token for.

Example request

{
  "fileUrl": "https://example.blob.core.windows.net/chatfiles/6650f1c2a9e4b83d2c7a1f05/product-handbook.pdf"
}

Response

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

status'success' required
urlstring required

The complete file URL with the new SAS token.

sasTokenstring required

The generated read-only SAS token.

Example response

{
  "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"
}

Changes

No recorded changes to this operation across all 1 revision of this API.