/Credentials/PublicKeys/
The unique string that that we created to identify the PublicKey resource.
^CR[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Account that created the Credential that the PublicKey resource belongs to.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The date and time in GMT when the resource was created specified in RFC 2822 format.
The date and time in GMT when the resource was last updated specified in RFC 2822 format.
The URI for this resource, relative to https://accounts.twilio.com
POST https://accounts.twilio.com/v1/Credentials/PublicKeys
application/x-www-form-urlencoded
A URL encoded representation of the public key. For example, -----BEGIN PUBLIC KEY-----MIIBIjANB.pa9xQIDAQAB-----END PUBLIC KEY-----
A descriptive string that you create to describe the resource. It can be up to 64 characters long.
The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function createCredentialPublicKey() {11const publicKey = await client.accounts.v1.credentials.publicKey.create({12publicKey: "PublicKey",13});1415console.log(publicKey.sid);16}1718createCredentialPublicKey();
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"date_created": "2015-07-31T04:00:00Z",4"date_updated": "2015-07-31T04:00:00Z",5"friendly_name": "friendly_name",6"sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",7"url": "https://accounts.twilio.com/v1/Credentials/PublicKeys/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"8}
GET https://accounts.twilio.com/v1/Credentials/PublicKeys/{Sid}
The Twilio-provided string that uniquely identifies the PublicKey resource to fetch.
^CR[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function fetchCredentialPublicKey() {11const publicKey = await client.accounts.v1.credentials12.publicKey("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.fetch();1415console.log(publicKey.sid);16}1718fetchCredentialPublicKey();
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"date_created": "2015-07-31T04:00:00Z",4"date_updated": "2015-07-31T04:00:00Z",5"friendly_name": "friendly_name",6"sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",7"url": "https://accounts.twilio.com/v1/Credentials/PublicKeys/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"8}
GET https://accounts.twilio.com/v1/Credentials/PublicKeys
How many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Maximum: 1000
The page token. This is provided by the API.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function listCredentialPublicKey() {11const publicKeys = await client.accounts.v1.credentials.publicKey.list({12limit: 20,13});1415publicKeys.forEach((p) => console.log(p.sid));16}1718listCredentialPublicKey();
1{2"credentials": [],3"meta": {4"first_page_url": "https://accounts.twilio.com/v1/Credentials/PublicKeys?PageSize=50&Page=0",5"key": "credentials",6"next_page_url": null,7"page": 0,8"page_size": 50,9"previous_page_url": null,10"url": "https://accounts.twilio.com/v1/Credentials/PublicKeys?PageSize=50&Page=0"11}12}
POST https://accounts.twilio.com/v1/Credentials/PublicKeys/{Sid}
The Twilio-provided string that uniquely identifies the PublicKey resource to update.
^CR[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
application/x-www-form-urlencoded
A descriptive string that you create to describe the resource. It can be up to 64 characters long.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function updateCredentialPublicKey() {11const publicKey = await client.accounts.v1.credentials12.publicKey("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.update({ friendlyName: "FriendlyName" });1415console.log(publicKey.sid);16}1718updateCredentialPublicKey();
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"date_created": "2015-07-31T04:00:00Z",4"date_updated": "2015-07-31T04:00:00Z",5"friendly_name": "FriendlyName",6"sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",7"url": "https://accounts.twilio.com/v1/Credentials/PublicKeys/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"8}
DELETE https://accounts.twilio.com/v1/Credentials/PublicKeys/{Sid}
The Twilio-provided string that uniquely identifies the PublicKey resource to delete.
^CR[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function deleteCredentialPublicKey() {11await client.accounts.v1.credentials12.publicKey("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.remove();14}1516deleteCredentialPublicKey();