Skip to main content

Refresh Client Token to join a room.

POST 
/rooms/:room_id/actions/refresh_client_token

Synchronously refresh an Client Token to join a Room. Client Token is necessary to join a Telnyx Room. Client Token will expire after token_ttl_secs.

Request

Path Parameters

    room_id uuidrequired

    The unique identifier of a room.

Body

required

Parameters that can be defined during Room Client Token refresh.

    token_ttl_secs integer

    Possible values: >= 10 and <= 3600

    Default value: 600

    The time to live in seconds of the Client Token, after that time the Client Token is invalid and can't be used to join a Room.

    refresh_token jwtrequired

Responses

201: Refresh room client token response.

403: Forbidden

Request samples


curl -L 'https://api.telnyx.com/v2/rooms/:room_id/actions/refresh_client_token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"token_ttl_secs": 600,
"refresh_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJ0ZWxueXhfdGVsZXBob255IiwiZXhwIjoxNTkwMDEwMTQzLCJpYXQiOjE1ODc1OTA5NDMsImlzcyI6InRlbG55eF90ZWxlcGhvbnkiLCJqdGkiOiJiOGM3NDgzNy1kODllLTRhNjUtOWNmMi0zNGM3YTZmYTYwYzgiLCJuYmYiOjE1ODc1OTA5NDIsInN1YiI6IjVjN2FjN2QwLWRiNjUtNGYxMS05OGUxLWVlYzBkMWQ1YzZhZSIsInRlbF90b2tlbiI6InJqX1pra1pVT1pNeFpPZk9tTHBFVUIzc2lVN3U2UmpaRmVNOXMtZ2JfeENSNTZXRktGQUppTXlGMlQ2Q0JSbWxoX1N5MGlfbGZ5VDlBSThzRWlmOE1USUlzenl6U2xfYURuRzQ4YU81MHlhSEd1UlNZYlViU1ltOVdJaVEwZz09IiwidHlwIjoiYWNjZXNzIn0.gNEwzTow5MLLPLQENytca7pUN79PmPj6FyqZWW06ZeEmesxYpwKh0xRtA0TzLh6CDYIRHrI8seofOO0YFGDhpQ"
}'

Response samples


{
"data": {
"token": "eyJhbGciOiJFZDI1NTE5IiwidHlwIjoiSldUIn0.eyJhdWQiOiJ0ZWxueXhf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