Skip to content
Start here

Retrieve TURN key details

client.calls.turn.get(stringkeyId, TURNGetParams { account_id } params, RequestOptionsoptions?): TURNGetResponse { created, modified, name, uid }
GET/accounts/{account_id}/calls/turn_keys/{key_id}

Fetches details for a single TURN key.

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)
Calls WriteCalls Read
ParametersExpand Collapse
keyId: string

A Cloudflare-generated unique identifier for a item.

maxLength32
minLength32
params: TURNGetParams { account_id }
account_id: string

The account identifier tag.

maxLength32
ReturnsExpand Collapse
TURNGetResponse { created, modified, name, uid }
created?: string

The date and time the item was created.

formatdate-time
modified?: string

The date and time the item was last modified.

formatdate-time
name?: string

A short description of Calls app, not shown to end users.

uid?: string

A Cloudflare-generated unique identifier for a item.

maxLength32
minLength32

Retrieve TURN key details

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

const turn = await client.calls.turn.get('2a95132c15732412d22c1476fa83f27a', {
  account_id: '023e105f4ecef8ad9ca31a8372d0c353',
});

console.log(turn.uid);
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "created": "2014-01-02T02:20:00Z",
    "modified": "2014-01-02T02:20:00Z",
    "name": "production-realtime-app",
    "uid": "2a95132c15732412d22c1476fa83f27a"
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "created": "2014-01-02T02:20:00Z",
    "modified": "2014-01-02T02:20:00Z",
    "name": "production-realtime-app",
    "uid": "2a95132c15732412d22c1476fa83f27a"
  }
}