メニュー

Expand
ページを評価:

Challenge Resource

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.

Verify TOTP is currently in the Pilot maturity stage, which means that you need to contact sales to request that your Twilio account gets access to it. The Challenge will not work for Verify TOTP without this access.

Verify Push is priced per approved/denied Challenge

料金表

Consistent with overall Verify pricing, Verify Push will be billed at a rate of $0.05 per verification. In technical terms, a "verification" is defined as a Challenge that is updated with a status of approved or denied.

Usage of Verify TOTP, as measured by the creation/updating of Challenges of factor_type:totp, is free while it's in the Pilot maturity stage. Billing will start once Verify TOTP reaches Private/Public Beta maturity stage, and pricing details will be provided then.

Challenge properties

Resource Properties in REST API format
sid
sid<YC> Not PII

A 34 character string that uniquely identifies this Challenge.

account_sid
sid<AC> Not PII

The unique SID identifier of the Account.

service_sid
sid<VA> Not PII

The unique SID identifier of the Service.

entity_sid
sid<YE> Not PII

The unique SID identifier of the Entity.

identity
文字列 PII MTL: 30 DAYS

Customer unique identity for the Entity owner of the Challenge. This value must be between 8 and 64 characters long.

factor_sid
sid<YF> Not PII

The unique SID identifier of the Factor.

date_created
date_time<iso8601> Not PII

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

date_updated
date_time<iso8601> Not PII

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

date_responded
date_time<iso8601> Not PII

The date that this Challenge was responded, given in ISO 8601 format.

expiration_date
date_time<iso8601> Not PII

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.

status
enum:challenge_statuses Not PII

The Status of this Challenge. One of pending, expired, approved or denied.

responded_reason
enum:challenge_reasons Not PII

Reason for the Challenge to be in certain status. One of none, not_needed or not_requested.

details
オブジェクト PII MTL: 30 DAYS

Details provided to give context about the Challenge. Intended to be shown to the end user.

hidden_details
オブジェクト PII MTL: 30 DAYS

Details provided to give context about the Challenge. Not intended to be shown to the end user. It must be a stringified JSON with only strings values eg. {"ip": "172.168.1.234"}

factor_type
enum:factor_types Not PII

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

url
url Not PII

The URL of this resource.

links
uri_map Not PII

Contains a dictionary of URL links to nested resources of this Challenge.

Create a Challenge resource

post
https://verify.twilio.com/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges
パラメーター
Parameters in REST API format
service_sid
Path
post sid<VA> Not PII

The unique SID identifier of the Service.

identity
Path
post 文字列 PII MTL: 30 DAYS

The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. This value must be between 8 and 64 characters long.

factor_sid
必須
post sid<YF> Not PII

The unique SID identifier of the Factor.

expiration_date
オプション
post date_time<iso8601> Not PII

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.message
オプション
post 文字列 Not PII

Shown to the user when the push notification arrives. Required when factor_type is push

details.fields
オプション
post object[] Not PII

A list of objects that describe the Fields included in the Challenge. Each object contains the label and value of the field. Used when factor_type is push.

hidden_details
オプション
post オブジェクト PII MTL: 30 DAYS

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"}

auth_payload
オプション
post 文字列 Not PII

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.

例 1
        
        
        
        
        例 2
              
              
              
              

              Fetch a Challenge resource

              GET
              https://verify.twilio.com/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid}
              パラメーター
              Parameters in REST API format
              service_sid
              Path
              GET sid<VA> Not PII

              The unique SID identifier of the Service.

              identity
              Path
              GET 文字列 PII MTL: 30 DAYS

              The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. This value must be between 8 and 64 characters long.

              sid
              Path
              GET sid<YC> Not PII

              A 34 character string that uniquely identifies this Challenge.

              例 1
                    
                    
                    
                    

                    Read multiple Challenge resources

                    GET
                    https://verify.twilio.com/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges
                    パラメーター
                    Parameters in REST API format
                    service_sid
                    Path
                    GET sid<VA> Not PII

                    The unique SID identifier of the Service.

                    identity
                    Path
                    GET 文字列 PII MTL: 30 DAYS

                    Customer unique identity for the Entity owner of the Challenge. This value must be between 8 and 64 characters long.

                    factor_sid
                    オプション
                    GET sid<YF> Not PII

                    The unique SID identifier of the Factor.

                    status
                    オプション
                    GET ienum:challenge_statuses Not PII

                    The Status of the Challenges to fetch. One of pending, expired, approved or denied.

                    例 1
                          
                          
                          
                          

                          Update a Challenge resource

                          post
                          https://verify.twilio.com/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid}
                          パラメーター
                          Parameters in REST API format
                          service_sid
                          Path
                          post sid<VA> Not PII

                          The unique SID identifier of the Service.

                          identity
                          Path
                          post 文字列 PII MTL: 30 DAYS

                          Customer unique identity for the Entity owner of the Challenge. This value must be between 8 and 64 characters long.

                          sid
                          Path
                          post sid<YC> Not PII

                          A 34 character string that uniquely identifies this Challenge.

                          auth_payload
                          オプション
                          post 文字列 Not PII

                          The optional payload needed to verify the Challenge. E.g., a TOTP would use the numeric code.

                          例 1
                                
                                
                                
                                
                                ページを評価:

                                ヘルプが必要ですか?

                                誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。

                                      
                                      
                                      

                                      フィードバックくださりありがとうございます!

                                      We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

                                      Sending your feedback...
                                      🎉 Thank you for your feedback!
                                      Something went wrong. Please try again.

                                      Thanks for your feedback!

                                      Refer us and get $10 in 3 simple steps!

                                      ステップ1

                                      Get link

                                      Get a free personal referral link here

                                      ステップ2:

                                      Give $10

                                      Your user signs up and upgrade using link

                                      ステップ3

                                      Get $10

                                      1,250 free SMSes
                                      OR 1,000 free voice mins
                                      OR 12,000 chats
                                      OR more