Create a new Challenge for the Factor
TODO: Resource-level docs
Create a new Challenge for the Factor
Path parameters
-
The unique SID identifier of the Service.
-
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.
Body
-
AuthPayload string
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. ForTOTP
this value must be between 3 and 8 characters long. -
Details.Fields array
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
ispush
. There can be up to 20 details fields. -
Details.Message string
Shown to the user when the push notification arrives. Required when
factor_type
ispush
. Can be up to 256 characters in length -
ExpirationDate string(date-time)
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.
-
The unique SID identifier of the Factor.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^YF[0-9a-fA-F]{32}$
.
curl \
-X POST https://verify.twilio.com/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'AuthPayload=string&&Details.Message=string&ExpirationDate=2023-05-04T09%3A42%3A00%2B00%3A00&FactorSid=string'
{
"AuthPayload": "string",
"Details.Fields": [],
"Details.Message": "string",
"ExpirationDate": "2023-05-04T09:42:00+00:00",
"FactorSid": "string"
}
{
"AuthPayload": "string",
"Details.Fields": [],
"Details.Message": "string",
"ExpirationDate": "2024-05-04T09:42:00+00:00",
"FactorSid": "string"
}
{
"account_sid": "string",
"date_created": "2023-05-04T09:42:00+00:00",
"date_responded": "2023-05-04T09:42:00+00:00",
"date_updated": "2023-05-04T09:42:00+00:00",
"entity_sid": "string",
"expiration_date": "2023-05-04T09:42:00+00:00",
"factor_sid": "string",
"factor_type": "push",
"identity": "string",
"links": {},
"responded_reason": "none",
"service_sid": "string",
"sid": "string",
"status": "pending",
"url": "https://example.com"
}
{
"account_sid": "string",
"date_created": "2024-05-04T09:42:00+00:00",
"date_responded": "2024-05-04T09:42:00+00:00",
"date_updated": "2024-05-04T09:42:00+00:00",
"entity_sid": "string",
"expiration_date": "2024-05-04T09:42:00+00:00",
"factor_sid": "string",
"factor_type": "push",
"identity": "string",
"links": {},
"responded_reason": "none",
"service_sid": "string",
"sid": "string",
"status": "pending",
"url": "https://example.com"
}