import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const response = await client.calls.actions.updateClientState('call_control_id', {
client_state: 'aGF2ZSBhIG5pY2UgZGF5ID1d',
});
console.log(response.data);{
"data": {
"result": "ok"
}
}Updates client state
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const response = await client.calls.actions.updateClientState('call_control_id', {
client_state: 'aGF2ZSBhIG5pY2UgZGF5ID1d',
});
console.log(response.data);{
"data": {
"result": "ok"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Unique identifier and token for controlling the call
Updates client state for every subsequent webhook
Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.
"aGF2ZSBhIG5pY2UgZGF5ID1d"
Was this page helpful?