import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
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"
}
}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: 'My API Key',
});
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"
}
}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.
Was this page helpful?