Realtime API

The Realtime API provides programmatic access to ongoing activity in your Tiledesk server. It is implemented using WebSocket technology.

You can use the API to:

  • Display requests data

  • Display agents data

  • Create and display a real-time dashboard

  • Predict or estimate capacity and other derived metrics

The Realtime API allows you to receive events from Tiledesk after you subscribe to one or more topics.

This API is an SSL-only API. You must be a verified user to make API requests. You can authorize against the API using a JWT token.

This API is SSL-only and requires a verified user. Authenticate using your JWT token when connecting.

Topics

Topic
Description

/PROJECT_ID/requests

Get the last open requests of a project

/PROJECT_ID/requests/REQUEST_ID

Get the request detail

/PROJECT_ID/requests/REQUEST_ID/messages

Get the request messages

/PROJECT_ID/project_users/PROJECT_USER_ID

Get the agents info

Rate Limiting

  • We only allow a certain number of new connections per minute. The number of new connections to the Realtime API is restricted by REST API rate limits.

  • We also allow a certain number of concurrently running connections to the Realtime API.

  • We reserve the right to adjust the rate limit for given endpoints in order to provide a high quality of service for all clients. If the rate limit is exceeded, Tiledesk will respond with a body that details the reason for the rate limiter kicking in.

  • We also limit the total amount of data exchanged through real time APIs. For example the number of Realtime requests exchanged can’t exceed a certain number of items. If this number is exceeded you can always use REST APIs to get additional data or to make more complex queries.

Allowed For

  • Owner

  • Administrator

  • Agent

Using the API

Follow these steps to use the Realtime API:

1

Establish connection

Connect to the WebSocket endpoint using your JWT token:

Endpoint: wss://eu.rtmv3.tiledesk.com/api/

2

Subscribe to a topic

Send a subscribe message for the topic you want (see Topics above for topic keys).

Example subscription message:

Send it over the socket:

Example:

3

Process incoming events

Once subscribed, listen for messages and process incoming events:

Sample message received after subscribing to the requests topic:

4

Unsubscribe

When you no longer need events for a topic, unsubscribe to stop receiving them:

Example

Simple example of the Tiledesk Realtime API

You can find a simple example here: https://www.w3schools.com/code/tryit.asp?filename=GJH61IZ9OU0E

Last updated 1 year ago

This site uses cookies to deliver its service and to analyze traffic. By browsing this site, you accept the privacy policy: https://tiledesk.com/privacy.html.