Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Factor Resource


The Factor resource is currently used by Verify Push and Verify TOTP features. It represents a verification factor/channel. When the factor_type is push, it contains the public key for a single registered device and metadata. When the factor_type is totp, it contains the seed used to generate TOTP codes and metadata. Some Factor properties apply to all factor_types and others do not. A single Entity links to multiple Factors and a single Factor links to multiple Challenges.


Factor Properties

(information)

Info

For security reasons the binding property is ONLY returned upon creation, and is never returned afterward.

Property nameTypePIIDescription
sidSID<YF>
Not PII

A 34 character string that uniquely identifies this Factor.

Pattern: ^YF[0-9a-fA-F]{32}$Min length: 34Max length: 34

account_sidSID<AC>

The unique SID identifier of the Account.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34

service_sidSID<VA>

The unique SID identifier of the Service.

Pattern: ^VA[0-9a-fA-F]{32}$Min length: 34Max length: 34

entity_sidSID<YE>

The unique SID identifier of the Entity.

Pattern: ^YE[0-9a-fA-F]{32}$Min length: 34Max length: 34

identitystring
PII MTL: 30 days

Customer unique identity for the Entity owner of the Factor. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters.


bindingobject

Contains the factor_type specific secret and metadata. For push, this is binding.public_key and binding.alg. For totp, this is binding.secret and binding.uri. The binding.uri property is generated following the google authenticator key URI format, and Factor.friendly_name is used for the “accountname” value and Service.friendly_name or Service.totp.issuer is used for the issuer value.

The Binding property is ONLY returned upon Factor creation.


date_createdstring<date-time>

The date that this Factor was created, given in ISO 8601 format.


date_updatedstring<date-time>

The date that this Factor was updated, given in ISO 8601 format.


friendly_namestring

The friendly name of this Factor. This can be any string up to 64 characters, meant for humans to distinguish between Factors. For factor_type push, this could be a device name. For factor_type totp, this value is used as the “account name” in constructing the binding.uri property. At the same time, we recommend avoiding providing PII.


statusenum<string>

The Status of this Factor. One of unverified or verified.

Possible values:
unverifiedverified

factor_typeenum<string>

The Type of this Factor. Currently push and totp are supported.

Possible values:
pushtotp

configobject

An object that contains configurations specific to a factor_type.


metadataobject

Custom metadata associated with the factor. This is added by the Device/SDK directly to allow for the inclusion of device information. It must be a stringified JSON with only strings values eg. {"os": "Android"}. Can be up to 1024 characters in length.


urlstring<uri>

The URL of this resource.


Create a new Factor resource

POST


_10
https://verify.twilio.com/v2/Services/{ServiceSid}/Entities/{Identity}/Factors

(information)

Info

  • Unverified Factors will be deleted and unverifiable after 1-24 hours from when they were created. This is done for security and clean-up reasons.
  • In the request, if the specified Entity with the {Identity} doesn't exist, it will be created automatically. You do not need to separately create a new Entity before making this request.

Parameters

Path parameters

Property nameTypeRequiredPIIDescription
ServiceSidSID<VA>required

The unique SID identifier of the Service.

Pattern: ^VA[0-9a-fA-F]{32}$Min length: 34Max length: 34

Identitystringrequired

Customer unique identity for the Entity owner of the Factor. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters.

Request body parameters

Property nameTypeRequiredPIIDescription
FriendlyNamestringrequired

The friendly name of this Factor. This can be any string up to 64 characters, meant for humans to distinguish between Factors. For factor_type push, this could be a device name. For factor_type totp, this value is used as the “account name” in constructing the binding.uri property. At the same time, we recommend avoiding providing PII.


FactorTypeenum<string>required

The Type of this Factor. Currently push and totp are supported.

Possible values:
pushtotp

Binding.AlgstringOptional

The algorithm used when factor_type is push. Algorithm supported: ES256


Binding.PublicKeystringOptional

The Ecdsa public key in PKIX, ASN.1 DER format encoded in Base64.

Required when factor_type is push


Config.AppIdstringOptional

The ID that uniquely identifies your app in the Google or Apple store, such as com.example.myapp. It can be up to 100 characters long.

Required when factor_type is push.


Config.NotificationPlatformenum<string>Optional

The transport technology used to generate the Notification Token. Can be apn, fcm or none.

Required when factor_type is push.

Possible values:
apnfcmnone

Config.NotificationTokenstringOptional

For APN, the device token. For FCM, the registration token. It is used to send the push notifications. Must be between 32 and 255 characters long.

Required when factor_type is push.


Config.SdkVersionstringOptional

The Verify Push SDK version used to configure the factor

Required when factor_type is push


Binding.SecretstringOptional

The shared secret for TOTP factors encoded in Base32. This can be provided when creating the Factor, otherwise it will be generated.

Used when factor_type is totp


Config.TimeStepintegerOptional

Defines how often, in seconds, are TOTP codes generated. i.e, a new TOTP code is generated every time_step seconds. Must be between 20 and 60 seconds, inclusive. The default value is defined at the service level in the property totp.time_step. Defaults to 30 seconds if not configured.

Used when factor_type is totp


Config.SkewintegerOptional

The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. The default value is defined at the service level in the property totp.skew. If not configured defaults to 1.

Used when factor_type is totp


Config.CodeLengthintegerOptional

Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. The default value is defined at the service level in the property totp.code_length. If not configured defaults to 6.

Used when factor_type is totp


Config.Algenum<string>Optional

The algorithm used to derive the TOTP codes. Can be sha1, sha256 or sha512. Defaults to sha1.

Used when factor_type is totp

Possible values:
sha1sha256sha512

MetadataobjectOptional

Custom metadata associated with the factor. This is added by the Device/SDK directly to allow for the inclusion of device information. It must be a stringified JSON with only strings values eg. {"os": "Android"}. Can be up to 1024 characters in length.

Example 1

Create New Push Factor

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_28
// Download the helper library from https://www.twilio.com/docs/node/install
_28
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_28
_28
// Find your Account SID and Auth Token at twilio.com/console
_28
// and set the environment variables. See http://twil.io/secure
_28
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_28
const authToken = process.env.TWILIO_AUTH_TOKEN;
_28
const client = twilio(accountSid, authToken);
_28
_28
async function createNewFactor() {
_28
const newFactor = await client.verify.v2
_28
.services("VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_28
.entities("ff483d1ff591898a9942916050d2ca3f")
_28
.newFactors.create({
_28
"binding.alg": "ES256",
_28
"binding.publicKey": "dGVzdF9rZXk=",
_28
"config.appId": "com.example.myapp",
_28
"config.notificationPlatform": "fcm",
_28
"config.notificationToken": "test_token",
_28
"config.sdkVersion": "1.0.0",
_28
factorType: "push",
_28
friendlyName: "John's Phone",
_28
});
_28
_28
console.log(newFactor.sid);
_28
}
_28
_28
createNewFactor();

Output

_26
{
_26
"sid": "YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_26
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_26
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_26
"entity_sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_26
"identity": "ff483d1ff591898a9942916050d2ca3f",
_26
"binding": {
_26
"alg": "ES256",
_26
"public_key": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8GdwtibWe0kpgsFl6xPQBwhtwUEyeJkeozFmi2jiJDzxFSMwVy3kVR1h/dPVYOfgkC0EkfBRJ0J/6xW47FD5vA=="
_26
},
_26
"date_created": "2015-07-30T20:00:00Z",
_26
"date_updated": "2015-07-30T20:00:00Z",
_26
"friendly_name": "John's Phone",
_26
"status": "unverified",
_26
"factor_type": "push",
_26
"config": {
_26
"sdk_version": "1.0",
_26
"app_id": "com.example.myapp",
_26
"notification_platform": "fcm",
_26
"notification_token": "test_token"
_26
},
_26
"metadata": {
_26
"os": "Android"
_26
},
_26
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_26
}

Example 2

Create New TOTP Factor

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_27
// Download the helper library from https://www.twilio.com/docs/node/install
_27
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_27
_27
// Find your Account SID and Auth Token at twilio.com/console
_27
// and set the environment variables. See http://twil.io/secure
_27
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_27
const authToken = process.env.TWILIO_AUTH_TOKEN;
_27
const client = twilio(accountSid, authToken);
_27
_27
async function createNewFactor() {
_27
const newFactor = await client.verify.v2
_27
.services("VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_27
.entities("ff483d1ff591898a9942916050d2ca3f")
_27
.newFactors.create({
_27
"binding.secret": "GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ",
_27
"config.alg": "sha1",
_27
"config.codeLength": 6,
_27
"config.skew": 1,
_27
"config.timeStep": 30,
_27
factorType: "totp",
_27
friendlyName: "John's Phone",
_27
});
_27
_27
console.log(newFactor.sid);
_27
}
_27
_27
createNewFactor();

Output

_24
{
_24
"sid": "YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_24
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_24
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_24
"entity_sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_24
"identity": "ff483d1ff591898a9942916050d2ca3f",
_24
"binding": {
_24
"secret": "GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ",
_24
"uri": "otpauth://totp/test-issuer:John%E2%80%99s%20Account%20Name?secret=GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ&issuer=test-issuer&algorithm=SHA1&digits=6&period=30"
_24
},
_24
"date_created": "2015-07-30T20:00:00Z",
_24
"date_updated": "2015-07-30T20:00:00Z",
_24
"friendly_name": "John's Phone",
_24
"status": "unverified",
_24
"factor_type": "totp",
_24
"config": {
_24
"alg": "sha1",
_24
"skew": 1,
_24
"code_length": 6,
_24
"time_step": 30
_24
},
_24
"metadata": null,
_24
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_24
}


Fetch a Factor resource

GET


_10
https://verify.twilio.com/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}

Parameters

Path parameters

Property nameTypeRequiredPIIDescription
ServiceSidSID<VA>required

The unique SID identifier of the Service.

Pattern: ^VA[0-9a-fA-F]{32}$Min length: 34Max length: 34

Identitystringrequired

Customer unique identity for the Entity owner of the Factor. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters.


SidSID<YF>required

A 34 character string that uniquely identifies this Factor.

Pattern: ^YF[0-9a-fA-F]{32}$Min length: 34Max length: 34

Example 1

Fetch a Factor

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_20
// Download the helper library from https://www.twilio.com/docs/node/install
_20
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_20
_20
// Find your Account SID and Auth Token at twilio.com/console
_20
// and set the environment variables. See http://twil.io/secure
_20
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_20
const authToken = process.env.TWILIO_AUTH_TOKEN;
_20
const client = twilio(accountSid, authToken);
_20
_20
async function fetchFactor() {
_20
const factor = await client.verify.v2
_20
.services("VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_20
.entities("Identity")
_20
.factors("YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_20
.fetch();
_20
_20
console.log(factor.sid);
_20
}
_20
_20
fetchFactor();

Output

_22
{
_22
"sid": "YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22
"entity_sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22
"identity": "Identity",
_22
"date_created": "2015-07-30T20:00:00Z",
_22
"date_updated": "2015-07-30T20:00:00Z",
_22
"friendly_name": "friendly_name",
_22
"status": "unverified",
_22
"factor_type": "push",
_22
"config": {
_22
"sdk_version": "1.0",
_22
"app_id": "com.example.myapp",
_22
"notification_platform": "fcm",
_22
"notification_token": "test_token"
_22
},
_22
"metadata": {
_22
"os": "Android"
_22
},
_22
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_22
}


Read multiple Factor resources

GET


_10
https://verify.twilio.com/v2/Services/{ServiceSid}/Entities/{Identity}/Factors

Parameters

Path parameters

Property nameTypeRequiredPIIDescription
ServiceSidSID<VA>required

The unique SID identifier of the Service.

Pattern: ^VA[0-9a-fA-F]{32}$Min length: 34Max length: 34

Identitystringrequired

Customer unique identity for the Entity owner of the Factors. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters.

Query parameters

Property nameTypeRequiredPIIDescription
PageSizeintegerOptional

How many resources to return in each list page. The default is 50, and the maximum is 1000.

Minimum: 1Maximum: 1000

PageintegerOptional

The page index. This value is simply for client state.

Minimum: 0

PageTokenstringOptional

The page token. This is provided by the API.

Example 1

Read multiple Factors

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_19
// Download the helper library from https://www.twilio.com/docs/node/install
_19
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_19
_19
// Find your Account SID and Auth Token at twilio.com/console
_19
// and set the environment variables. See http://twil.io/secure
_19
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19
const authToken = process.env.TWILIO_AUTH_TOKEN;
_19
const client = twilio(accountSid, authToken);
_19
_19
async function listFactor() {
_19
const factors = await client.verify.v2
_19
.services("VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_19
.entities("ff483d1ff591898a9942916050d2ca3f")
_19
.factors.list({ limit: 20 });
_19
_19
factors.forEach((f) => console.log(f.sid));
_19
}
_19
_19
listFactor();

Output

_12
{
_12
"factors": [],
_12
"meta": {
_12
"page": 0,
_12
"page_size": 50,
_12
"first_page_url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors?PageSize=50&Page=0",
_12
"previous_page_url": null,
_12
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors?PageSize=50&Page=0",
_12
"next_page_url": null,
_12
"key": "factors"
_12
}
_12
}


Update a Factor resource

POST


_10
https://verify.twilio.com/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}

Parameters

Path parameters

Property nameTypeRequiredPIIDescription
ServiceSidSID<VA>required

The unique SID identifier of the Service.

Pattern: ^VA[0-9a-fA-F]{32}$Min length: 34Max length: 34

Identitystringrequired

Customer unique identity for the Entity owner of the Factor. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters.


SidSID<YF>required

A 34 character string that uniquely identifies this Factor.

Pattern: ^YF[0-9a-fA-F]{32}$Min length: 34Max length: 34

Request body parameters

Property nameTypeRequiredPIIDescription
AuthPayloadstringOptional

The optional payload needed to verify the Factor for the first time. E.g. for a TOTP, the numeric code.


FriendlyNamestringOptional

The new friendly name of this Factor. It can be up to 64 characters.


Config.NotificationTokenstringOptional

For APN, the device token. For FCM, the registration token. It is used to send the push notifications. Required when factor_type is push. If specified, this value must be between 32 and 255 characters long.


Config.SdkVersionstringOptional

The Verify Push SDK version used to configure the factor


Config.TimeStepintegerOptional

Defines how often, in seconds, are TOTP codes generated. i.e, a new TOTP code is generated every time_step seconds. Must be between 20 and 60 seconds, inclusive


Config.SkewintegerOptional

The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive


Config.CodeLengthintegerOptional

Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive


Config.Algenum<string>Optional

The algorithm used to derive the TOTP codes. Can be sha1, sha256 or sha512

Possible values:
sha1sha256sha512

Config.NotificationPlatformstringOptional

The transport technology used to generate the Notification Token. Can be apn, fcm or none.

Required when factor_type is push.

Example 1

Update a Factor

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_20
// Download the helper library from https://www.twilio.com/docs/node/install
_20
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_20
_20
// Find your Account SID and Auth Token at twilio.com/console
_20
// and set the environment variables. See http://twil.io/secure
_20
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_20
const authToken = process.env.TWILIO_AUTH_TOKEN;
_20
const client = twilio(accountSid, authToken);
_20
_20
async function updateFactor() {
_20
const factor = await client.verify.v2
_20
.services("VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_20
.entities("ff483d1ff591898a9942916050d2ca3f")
_20
.factors("YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_20
.update({ authPayload: "724590" });
_20
_20
console.log(factor.sid);
_20
}
_20
_20
updateFactor();

Output

_22
{
_22
"sid": "YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22
"entity_sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22
"identity": "ff483d1ff591898a9942916050d2ca3f",
_22
"date_created": "2015-07-30T20:00:00Z",
_22
"date_updated": "2015-07-30T20:00:00Z",
_22
"friendly_name": "friendly_name",
_22
"status": "verified",
_22
"factor_type": "push",
_22
"config": {
_22
"sdk_version": "1.0",
_22
"app_id": "com.example.myapp",
_22
"notification_platform": "fcm",
_22
"notification_token": "test_token"
_22
},
_22
"metadata": {
_22
"os": "Android"
_22
},
_22
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_22
}

Update a TOTP factor settings

Increases time step and code length

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_23
// Download the helper library from https://www.twilio.com/docs/node/install
_23
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_23
_23
// Find your Account SID and Auth Token at twilio.com/console
_23
// and set the environment variables. See http://twil.io/secure
_23
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_23
const authToken = process.env.TWILIO_AUTH_TOKEN;
_23
const client = twilio(accountSid, authToken);
_23
_23
async function updateFactor() {
_23
const factor = await client.verify.v2
_23
.services("VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_23
.entities("ff483d1ff591898a9942916050d2ca3f")
_23
.factors("YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_23
.update({
_23
"config.codeLength": 8,
_23
"config.timeStep": 45,
_23
});
_23
_23
console.log(factor.config);
_23
}
_23
_23
updateFactor();

Output

_22
{
_22
"sid": "YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22
"entity_sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22
"identity": "ff483d1ff591898a9942916050d2ca3f",
_22
"date_created": "2015-07-30T20:00:00Z",
_22
"date_updated": "2015-07-30T20:00:00Z",
_22
"friendly_name": "friendly_name",
_22
"status": "verified",
_22
"factor_type": "push",
_22
"config": {
_22
"sdk_version": "1.0",
_22
"app_id": "com.example.myapp",
_22
"notification_platform": "fcm",
_22
"notification_token": "test_token"
_22
},
_22
"metadata": {
_22
"os": "Android"
_22
},
_22
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_22
}


Delete a Factor resource

DELETE


_10
https://verify.twilio.com/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}

Parameters

Path parameters

Property nameTypeRequiredPIIDescription
ServiceSidSID<VA>required

The unique SID identifier of the Service.

Pattern: ^VA[0-9a-fA-F]{32}$Min length: 34Max length: 34

Identitystringrequired

Customer unique identity for the Entity owner of the Factor. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters.


SidSID<YF>required

A 34 character string that uniquely identifies this Factor.

Pattern: ^YF[0-9a-fA-F]{32}$Min length: 34Max length: 34

Example 1

Delete a Factor

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function deleteFactor() {
_18
await client.verify.v2
_18
.services("VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18
.entities("ff483d1ff591898a9942916050d2ca3f")
_18
.factors("YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18
.remove();
_18
}
_18
_18
deleteFactor();


Rate this page: