Check out our upcoming events and meetups! View events →
Create a new secret with an associated identifier that can be used to securely integrate with other services.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const integrationSecret = await client.integrationSecrets.create({
identifier: 'my_secret',
type: 'bearer',
token: 'my_secret_value',
});
console.log(integrationSecret.data);{
"data": {
"record_type": "integration_secret",
"id": "<string>",
"identifier": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Documentation Index
Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The unique identifier of the secret.
The type of secret.
bearer, basic The token for the secret. Required for bearer type secrets, ignored otherwise.
The username for the secret. Required for basic type secrets, ignored otherwise.
The password for the secret. Required for basic type secrets, ignored otherwise.
Successful Response
Show child attributes
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const integrationSecret = await client.integrationSecrets.create({
identifier: 'my_secret',
type: 'bearer',
token: 'my_secret_value',
});
console.log(integrationSecret.data);{
"data": {
"record_type": "integration_secret",
"id": "<string>",
"identifier": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}