Menu

Expand
Rate this page:

Factor Resource

Verify Push is in Public Beta.

The Factor resource represents a verification factor/channel. When the factor_type is push, then it contains the metadata for a single registered device. A single Entity contains multiple Factors and a single Factor contains multiple Challenges.

Factor properties

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

A 34 character string that uniquely identifies this Factor.

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

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.

date_created
date_time<iso8601> Not PII

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

date_updated
date_time<iso8601> Not PII

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

friendly_name
string Not PII

A human readable description of this resource, up to 64 characters. For a push factor, this can be the device's name.

status
enum:factor_statuses Not PII

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

factor_type
enum:factor_types Not PII

The Type of this Factor. Currently only push is supported.

config
object Not PII

An object that contains configurations specific to a factor_type.

url
url Not PII

The URL of this resource.

Create a Factor

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

The unique SID identifier of the Service.

identity
Path
post string PII MTL: 30 DAYS

Customer unique identity for the Entity owner of the Factor

friendly_name
Required
post string Not PII

The friendly name of this Factor

factor_type
Required
post ienum:factor_types Not PII

The Type of this Factor. Currently only push is supported

binding.alg
Optional
post string Not PII

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

binding.public_key
Optional
post base64 Not PII

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

config.app_id
Optional
post string Not PII

The ID that uniquely identifies your app in the Google or Apple store, such as com.example.myapp. Required when factor_type is push

config.notification_platform
Optional
post ienum:notification_platforms Not PII

The transport technology used to generate the Notification Token. Can be apn or fcm. Required when factor_type is push

config.notification_token
Optional
post string Not PII

For APN, the device token. For FCM the registration token. It used to send the push notifications. Required when factor_type is push

config.sdk_version
Optional
post string Not PII

The Verify Push SDK version used to configure the factor

Example 1
        
        
        
        

        Get a Factor

        get
        https://verify.twilio.com/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}
        Parameters
        Parameters in REST API format
        service_sid
        Path
        get sid<VA> Not PII

        The unique SID identifier of the Service.

        identity
        Path
        get string PII MTL: 30 DAYS

        Customer unique identity for the Entity owner of the Factor

        sid
        Path
        get sid<YF> Not PII

        A 34 character string that uniquely identifies this Factor.

        Example 1
              
              
              
              

              List Factors

              get
              https://verify.twilio.com/v2/Services/{ServiceSid}/Entities/{Identity}/Factors
              Parameters
              Parameters in REST API format
              service_sid
              Path
              get sid<VA> Not PII

              The unique SID identifier of the Service.

              identity
              Path
              get string PII MTL: 30 DAYS

              Customer unique identity for the Entity owner of the Factor

              Example 1
                    
                    
                    
                    

                    Update a Factor

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

                    The unique SID identifier of the Service.

                    identity
                    Path
                    post string PII MTL: 30 DAYS

                    Customer unique identity for the Entity owner of the Factor

                    sid
                    Path
                    post sid<YF> Not PII

                    A 34 character string that uniquely identifies this Factor.

                    auth_payload
                    Optional
                    post string Not PII

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

                    friendly_name
                    Optional
                    post string Not PII

                    The new friendly name of this Factor

                    config.notification_token
                    Optional
                    post string Not PII

                    For APN, the device token. For FCM the registration token. It used to send the push notifications. Required when factor_type is push

                    config.sdk_version
                    Optional
                    post string Not PII

                    The Verify Push SDK version used to configure the factor

                    Example 1
                          
                          
                          
                          

                          Delete a Factor

                          delete
                          https://verify.twilio.com/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}
                          Parameters
                          Parameters in REST API format
                          service_sid
                          Path
                          delete sid<VA> Not PII

                          The unique SID identifier of the Service.

                          identity
                          Path
                          delete string PII MTL: 30 DAYS

                          Customer unique identity for the Entity owner of the Factor

                          sid
                          Path
                          delete sid<YF> Not PII

                          A 34 character string that uniquely identifies this Factor.

                          Example 1
                                
                                
                                
                                
                                Rate this page:

                                Need some help?

                                We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.

                                      
                                      
                                      

                                      Thank you for your feedback!

                                      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!

                                      Step 1

                                      Get link

                                      Get a free personal referral link here

                                      Step 2

                                      Give $10

                                      Your user signs up and upgrade using link

                                      Step 3

                                      Get $10

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