RelayrtcDocs
Get started
Documentation
REST API v1

TURN credentials

Fields returned by the REST API for turn credentials.

On this page

Fields

FieldTypeMeaning
expiresAtstringCredential expiry timestamp.
usernamestringIssued TURN username.
ttlSecondsnumberCredential lifetime in seconds.
iceServersarraySTUN/TURN RTCIceServer entries.

Example

JSON
{
  "expiresAt": "2026-01-01T12:10:00.000Z",
  "username": "issued-turn-username",
  "ttlSeconds": 600,
  "iceServers": [
    {
      "urls": [
        "stun:turn.your-domain.example:3478"
      ]
    },
    {
      "urls": [
        "turn:turn.your-domain.example:3478?transport=udp"
      ],
      "username": "issued-turn-username",
      "credential": "issued-turn-password",
      "credentialType": "password"
    }
  ]
}

ICE server entries

Each entry has urls: string[]. TURN entries also include username, credential and credentialType: 'password'. Pass the returned entries to browser ICE configuration; do not use the REST API key as a TURN password.