Skip to content
Start here

Fetch all chat messages of a session

GET/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/chat

Returns a URL to download all chat messages of the session ID in CSV format.

Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Realtime AdminRealtime
Path ParametersExpand Collapse
account_id: string

The account identifier tag.

maxLength32
app_id: string

The app identifier tag.

maxLength32
session_id: string
ReturnsExpand Collapse
data: optional { chat_download_url, chat_download_url_expiry }
chat_download_url: string

URL where the chat logs can be downloaded

chat_download_url_expiry: string

Time when the download URL will expire

success: optional boolean

Fetch all chat messages of a session

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/realtime/kit/$APP_ID/sessions/$SESSION_ID/chat \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
{
  "data": {
    "chat_download_url": "chat_download_url",
    "chat_download_url_expiry": "chat_download_url_expiry"
  },
  "success": true
}
Returns Examples
{
  "data": {
    "chat_download_url": "chat_download_url",
    "chat_download_url_expiry": "chat_download_url_expiry"
  },
  "success": true
}