The Challenge resource is currently used by Verify Push and Verify TOTP features. It represents a single verification attempt of an Entity using a Factor. When the factor_type is push, a Challenge is created to verify the signature of the message sent from the registered device with the public key stored in the Factor. When the factor_type is totp, a Challenge is created to verify that the TOTP code provided by the user matches the one generated by the seed stored in the Factor. Some Challenge 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.
Challenges and Billing
Verify Push
Consistent with overall Verify pricing, Verify Push is billed at a rate of $0.05 per verification. In technical terms, a Verify Push "verification" is defined as a Challenge of factor_type:push that is updated with a status of approved or denied.
Verify TOTP
Consistent with overall Verify pricing, Verify TOTP will be billed at a rate of $0.05 per verification. In technical terms, a Verify TOTP "verification" is defined as a Challenge of factor_type:totp that is updated with a status of approved.
Customer unique identity for the Entity owner of the Challenge. 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.
The date-time when this Challenge expires, given in ISO 8601 format. The default value is five (5) minutes after Challenge creation. The max value is sixty (60) minutes after creation.
Details provided to give context about the Challenge. Intended to be hidden from the end user. It must be a stringified JSON with only strings values eg. {"ip": "172.168.1.234"}
Custom metadata associated with the challenge. 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.
Customer unique identity for the Entity owner of the Challenge. 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.
The date-time when this Challenge expires, given in ISO 8601 format. The default value is five (5) minutes after Challenge creation. The max value is sixty (60) minutes after creation.
A list of objects that describe the Fields included in the Challenge. Each object contains the label and value of the field, the label can be up to 36 characters in length and the value can be up to 128 characters in length. Used when factor_type is push. There can be up to 20 details fields.
Details provided to give context about the Challenge. Not shown to the end user. It must be a stringified JSON with only strings values eg. {"ip": "172.168.1.234"}. Can be up to 1024 characters in length
Optional payload used to verify the Challenge upon creation. Only used with a Factor of type totp to carry the TOTP code that needs to be verified. For TOTP this value must be between 3 and 8 characters long.
Create Push Challenge
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl
_35
// Download the helper library from https://www.twilio.com/docs/node/install
_35
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_35
_35
// Find your Account SID and Auth Token at twilio.com/console
_35
// and set the environment variables. See http://twil.io/secure
Customer unique identity for the Entity owner of the Challenges. 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.
Customer unique identity for the Entity owner of the Challenge. 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.
Customer unique identity for the Entity owner of the Challenge. 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.
The optional payload needed to verify the Challenge. E.g., a TOTP would use the numeric code. For TOTP this value must be between 3 and 8 characters long. For Push this value can be up to 5456 characters in length
Custom metadata associated with the challenge. 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.
Update a Challenge
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