Skip to main content
PATCH
/
telephony_credentials
/
{id}
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const telephonyCredential = await client.telephonyCredentials.update('id');

console.log(telephonyCredential.data);
{
  "data": {
    "id": "c215ade3-0d39-418e-94be-c5f780760199",
    "record_type": "credential",
    "name": "2020-06-18 21:32:38.917732Z",
    "expired": "false",
    "user_id": "user-id",
    "resource_id": "connection:804252963366242252",
    "sip_password": "a92dbcfb60184a8cb330b0acb2f7617b",
    "sip_username": "gencrednCvHU5IYpSBPPsXI2iQsDX",
    "created_at": "2020-06-18T21:32:38",
    "expires_at": "2042-06-18T21:32:38",
    "updated_at": "2020-06-18T21:32:38.000Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Identifies the resource.

Body

application/json

Parameters that can be updated in a credential

name
string
tag
string

Tags a credential. A single tag can hold at maximum 1000 credentials.

Example:

"some_tag"

connection_id
string

Identifies the Credential Connection this credential is associated with.

Example:

"987654321"

expires_at
string

ISO-8601 formatted date indicating when the credential will expire.

Example:

"2018-02-02T22:25:27.521Z"

Response

Successful response with details about a credential

data
On-demand Credential · object
Example:
{
"id": "c215ade3-0d39-418e-94be-c5f780760199",
"record_type": "credential",
"name": "2020-06-18 21:32:38.917732Z",
"expired": "false",
"user_id": "user-id",
"resource_id": "connection:804252963366242252",
"sip_password": "a92dbcfb60184a8cb330b0acb2f7617b",
"sip_username": "gencrednCvHU5IYpSBPPsXI2iQsDX",
"created_at": "2020-06-18T21:32:38",
"expires_at": "2042-06-18T21:32:38",
"updated_at": "2020-06-18T21:32:38.000Z"
}