twilio.rest.verify.v2.service package

Submodules

twilio.rest.verify.v2.service.access_token module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.verify.v2.service.access_token.AccessTokenInstance(version, payload, service_sid)[source]

Bases: twilio.base.instance_resource.InstanceResource

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

class FactorTypes[source]

Bases: object

PUSH = 'push'
token
Returns:Generated access token.
Return type:unicode
class twilio.rest.verify.v2.service.access_token.AccessTokenList(version, service_sid)[source]

Bases: twilio.base.list_resource.ListResource

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

create(identity, factor_type, factor_friendly_name=<object object>)[source]

Create the AccessTokenInstance

Parameters:
  • identity (unicode) – Unique external identifier of the Entity
  • factor_type (AccessTokenInstance.FactorTypes) – The Type of this Factor
  • factor_friendly_name (unicode) – The factor friendly name
Returns:

The created AccessTokenInstance

Return type:

twilio.rest.verify.v2.service.access_token.AccessTokenInstance

class twilio.rest.verify.v2.service.access_token.AccessTokenPage(version, response, solution)[source]

Bases: twilio.base.page.Page

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

get_instance(payload)[source]

Build an instance of AccessTokenInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.verify.v2.service.access_token.AccessTokenInstance
Return type:twilio.rest.verify.v2.service.access_token.AccessTokenInstance

twilio.rest.verify.v2.service.messaging_configuration module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.verify.v2.service.messaging_configuration.MessagingConfigurationContext(version, service_sid, country)[source]

Bases: twilio.base.instance_context.InstanceContext

delete()[source]

Deletes the MessagingConfigurationInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the MessagingConfigurationInstance

Returns:The fetched MessagingConfigurationInstance
Return type:twilio.rest.verify.v2.service.messaging_configuration.MessagingConfigurationInstance
update(messaging_service_sid)[source]

Update the MessagingConfigurationInstance

Parameters:messaging_service_sid (unicode) – The SID of the Messaging Service used for this configuration.
Returns:The updated MessagingConfigurationInstance
Return type:twilio.rest.verify.v2.service.messaging_configuration.MessagingConfigurationInstance
class twilio.rest.verify.v2.service.messaging_configuration.MessagingConfigurationInstance(version, payload, service_sid, country=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
country
Returns:The ISO-3166-1 country code of the country or all.
Return type:unicode
date_created
Returns:The RFC 2822 date and time in GMT when the resource was created
Return type:datetime
date_updated
Returns:The RFC 2822 date and time in GMT when the resource was last updated
Return type:datetime
delete()[source]

Deletes the MessagingConfigurationInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the MessagingConfigurationInstance

Returns:The fetched MessagingConfigurationInstance
Return type:twilio.rest.verify.v2.service.messaging_configuration.MessagingConfigurationInstance
messaging_service_sid
Returns:The SID of the Messaging Service used for this configuration.
Return type:unicode
service_sid
Returns:The SID of the Service that the resource is associated with
Return type:unicode
update(messaging_service_sid)[source]

Update the MessagingConfigurationInstance

Parameters:messaging_service_sid (unicode) – The SID of the Messaging Service used for this configuration.
Returns:The updated MessagingConfigurationInstance
Return type:twilio.rest.verify.v2.service.messaging_configuration.MessagingConfigurationInstance
url
Returns:The URL of this resource.
Return type:unicode
class twilio.rest.verify.v2.service.messaging_configuration.MessagingConfigurationList(version, service_sid)[source]

Bases: twilio.base.list_resource.ListResource

create(country, messaging_service_sid)[source]

Create the MessagingConfigurationInstance

Parameters:
  • country (unicode) – The ISO-3166-1 country code of the country or all.
  • messaging_service_sid (unicode) – The SID of the Messaging Service used for this configuration.
Returns:

The created MessagingConfigurationInstance

Return type:

twilio.rest.verify.v2.service.messaging_configuration.MessagingConfigurationInstance

get(country)[source]

Constructs a MessagingConfigurationContext

Parameters:country – The ISO-3166-1 country code of the country or all.
Returns:twilio.rest.verify.v2.service.messaging_configuration.MessagingConfigurationContext
Return type:twilio.rest.verify.v2.service.messaging_configuration.MessagingConfigurationContext
get_page(target_url)[source]

Retrieve a specific page of MessagingConfigurationInstance records from the API. Request is executed immediately

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of MessagingConfigurationInstance
Return type:twilio.rest.verify.v2.service.messaging_configuration.MessagingConfigurationPage
list(limit=None, page_size=None)[source]

Lists MessagingConfigurationInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.

Parameters:
  • limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.verify.v2.service.messaging_configuration.MessagingConfigurationInstance]

page(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

Retrieve a single page of MessagingConfigurationInstance records from the API. Request is executed immediately

Parameters:
  • page_token (str) – PageToken provided by the API
  • page_number (int) – Page Number, this value is simply for client state
  • page_size (int) – Number of records to return, defaults to 50
Returns:

Page of MessagingConfigurationInstance

Return type:

twilio.rest.verify.v2.service.messaging_configuration.MessagingConfigurationPage

stream(limit=None, page_size=None)[source]

Streams MessagingConfigurationInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.

Parameters:
  • limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.verify.v2.service.messaging_configuration.MessagingConfigurationInstance]

class twilio.rest.verify.v2.service.messaging_configuration.MessagingConfigurationPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of MessagingConfigurationInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.verify.v2.service.messaging_configuration.MessagingConfigurationInstance
Return type:twilio.rest.verify.v2.service.messaging_configuration.MessagingConfigurationInstance

twilio.rest.verify.v2.service.verification module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.verify.v2.service.verification.VerificationContext(version, service_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

fetch()[source]

Fetch the VerificationInstance

Returns:The fetched VerificationInstance
Return type:twilio.rest.verify.v2.service.verification.VerificationInstance
update(status)[source]

Update the VerificationInstance

Parameters:status (VerificationInstance.Status) – The new status of the resource
Returns:The updated VerificationInstance
Return type:twilio.rest.verify.v2.service.verification.VerificationInstance
class twilio.rest.verify.v2.service.verification.VerificationInstance(version, payload, service_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

class Channel[source]

Bases: object

CALL = 'call'
EMAIL = 'email'
SMS = 'sms'
WHATSAPP = 'whatsapp'
class Status[source]

Bases: object

APPROVED = 'approved'
CANCELED = 'canceled'
account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
amount
Returns:The amount of the associated PSD2 compliant transaction.
Return type:unicode
channel
Returns:The verification method used.
Return type:VerificationInstance.Channel
date_created
Returns:The RFC 2822 date and time in GMT when the resource was created
Return type:datetime
date_updated
Returns:The RFC 2822 date and time in GMT when the resource was last updated
Return type:datetime
fetch()[source]

Fetch the VerificationInstance

Returns:The fetched VerificationInstance
Return type:twilio.rest.verify.v2.service.verification.VerificationInstance
lookup
Returns:Information about the phone number being verified
Return type:dict
payee
Returns:The payee of the associated PSD2 compliant transaction
Return type:unicode
send_code_attempts
Returns:An array of verification attempt objects.
Return type:list[dict]
service_sid
Returns:The SID of the Service that the resource is associated with
Return type:unicode
sid
Returns:The unique string that identifies the resource
Return type:unicode
status
Returns:The status of the verification resource
Return type:unicode
to
Returns:The phone number or email being verified
Return type:unicode
update(status)[source]

Update the VerificationInstance

Parameters:status (VerificationInstance.Status) – The new status of the resource
Returns:The updated VerificationInstance
Return type:twilio.rest.verify.v2.service.verification.VerificationInstance
url
Returns:The absolute URL of the Verification resource
Return type:unicode
valid
Returns:Whether the verification was successful
Return type:bool
class twilio.rest.verify.v2.service.verification.VerificationList(version, service_sid)[source]

Bases: twilio.base.list_resource.ListResource

create(to, channel, custom_friendly_name=<object object>, custom_message=<object object>, send_digits=<object object>, locale=<object object>, custom_code=<object object>, amount=<object object>, payee=<object object>, rate_limits=<object object>, channel_configuration=<object object>, app_hash=<object object>, template_sid=<object object>, template_custom_substitutions=<object object>)[source]

Create the VerificationInstance

Parameters:
  • to (unicode) – The phone number or email to verify
  • channel (unicode) – The verification method to use
  • custom_friendly_name (unicode) – A custom user defined friendly name
  • custom_message (unicode) – The text of a custom message to use for the verification
  • send_digits (unicode) – The digits to send after a phone call is answered
  • locale (unicode) – The locale to use for the verification SMS, WhatsApp or call
  • custom_code (unicode) – A pre-generated code
  • amount (unicode) – The amount of the associated PSD2 compliant transaction.
  • payee (unicode) – The payee of the associated PSD2 compliant transaction
  • rate_limits (dict) – The custom key-value pairs of Programmable Rate Limits.
  • channel_configuration (dict) – Channel specific configuration in json format.
  • app_hash (unicode) – Your App Hash to be appended at the end of an SMS.
  • template_sid (unicode) – The verification template SMS messages.
  • template_custom_substitutions (unicode) – The values of the special variables declared on the message template.
Returns:

The created VerificationInstance

Return type:

twilio.rest.verify.v2.service.verification.VerificationInstance

get(sid)[source]

Constructs a VerificationContext

Parameters:sid – The unique string that identifies the resource
Returns:twilio.rest.verify.v2.service.verification.VerificationContext
Return type:twilio.rest.verify.v2.service.verification.VerificationContext
class twilio.rest.verify.v2.service.verification.VerificationPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of VerificationInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.verify.v2.service.verification.VerificationInstance
Return type:twilio.rest.verify.v2.service.verification.VerificationInstance

twilio.rest.verify.v2.service.verification_check module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.verify.v2.service.verification_check.VerificationCheckInstance(version, payload, service_sid)[source]

Bases: twilio.base.instance_resource.InstanceResource

class Channel[source]

Bases: object

CALL = 'call'
EMAIL = 'email'
SMS = 'sms'
WHATSAPP = 'whatsapp'
account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
amount
Returns:The amount of the associated PSD2 compliant transaction.
Return type:unicode
channel
Returns:The verification method to use
Return type:VerificationCheckInstance.Channel
date_created
Returns:The ISO 8601 date and time in GMT when the Verification Check resource was created
Return type:datetime
date_updated
Returns:The ISO 8601 date and time in GMT when the Verification Check resource was last updated
Return type:datetime
payee
Returns:The payee of the associated PSD2 compliant transaction
Return type:unicode
service_sid
Returns:The SID of the Service that the resource is associated with
Return type:unicode
sid
Returns:The unique string that identifies the resource
Return type:unicode
status
Returns:The status of the verification resource
Return type:unicode
to
Returns:The phone number or email being verified
Return type:unicode
valid
Returns:Whether the verification was successful
Return type:bool
class twilio.rest.verify.v2.service.verification_check.VerificationCheckList(version, service_sid)[source]

Bases: twilio.base.list_resource.ListResource

create(code, to=<object object>, verification_sid=<object object>, amount=<object object>, payee=<object object>)[source]

Create the VerificationCheckInstance

Parameters:
  • code (unicode) – The verification string
  • to (unicode) – The phone number or email to verify
  • verification_sid (unicode) – A SID that uniquely identifies the Verification Check
  • amount (unicode) – The amount of the associated PSD2 compliant transaction.
  • payee (unicode) – The payee of the associated PSD2 compliant transaction
Returns:

The created VerificationCheckInstance

Return type:

twilio.rest.verify.v2.service.verification_check.VerificationCheckInstance

class twilio.rest.verify.v2.service.verification_check.VerificationCheckPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of VerificationCheckInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.verify.v2.service.verification_check.VerificationCheckInstance
Return type:twilio.rest.verify.v2.service.verification_check.VerificationCheckInstance

twilio.rest.verify.v2.service.webhook module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.verify.v2.service.webhook.WebhookContext(version, service_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

delete()[source]

Deletes the WebhookInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the WebhookInstance

Returns:The fetched WebhookInstance
Return type:twilio.rest.verify.v2.service.webhook.WebhookInstance
update(friendly_name=<object object>, event_types=<object object>, webhook_url=<object object>, status=<object object>, version=<object object>)[source]

Update the WebhookInstance

Parameters:
  • friendly_name (unicode) – The string that you assigned to describe the webhook
  • event_types (list[unicode]) – The array of events that this Webhook is subscribed to.
  • webhook_url (unicode) – The URL associated with this Webhook.
  • status (WebhookInstance.Status) – The webhook status
  • version (WebhookInstance.Version) – The webhook version
Returns:

The updated WebhookInstance

Return type:

twilio.rest.verify.v2.service.webhook.WebhookInstance

class twilio.rest.verify.v2.service.webhook.WebhookInstance(version, payload, service_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

class Methods[source]

Bases: object

GET = 'GET'
POST = 'POST'
class Status[source]

Bases: object

DISABLED = 'disabled'
ENABLED = 'enabled'
class Version[source]

Bases: object

V1 = 'v1'
V2 = 'v2'
account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
date_created
Returns:The ISO 8601 date and time in GMT when the resource was created
Return type:datetime
date_updated
Returns:The ISO 8601 date and time in GMT when the resource was last updated
Return type:datetime
delete()[source]

Deletes the WebhookInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
event_types
Returns:The array of events that this Webhook is subscribed to.
Return type:list[unicode]
fetch()[source]

Fetch the WebhookInstance

Returns:The fetched WebhookInstance
Return type:twilio.rest.verify.v2.service.webhook.WebhookInstance
friendly_name
Returns:The string that you assigned to describe the webhook
Return type:unicode
service_sid
Returns:Service Sid.
Return type:unicode
sid
Returns:The unique string that identifies the resource
Return type:unicode
status
Returns:The webhook status
Return type:WebhookInstance.Status
update(friendly_name=<object object>, event_types=<object object>, webhook_url=<object object>, status=<object object>, version=<object object>)[source]

Update the WebhookInstance

Parameters:
  • friendly_name (unicode) – The string that you assigned to describe the webhook
  • event_types (list[unicode]) – The array of events that this Webhook is subscribed to.
  • webhook_url (unicode) – The URL associated with this Webhook.
  • status (WebhookInstance.Status) – The webhook status
  • version (WebhookInstance.Version) – The webhook version
Returns:

The updated WebhookInstance

Return type:

twilio.rest.verify.v2.service.webhook.WebhookInstance

url
Returns:The absolute URL of the Webhook resource
Return type:unicode
version
Returns:The webhook version
Return type:WebhookInstance.Version
webhook_method
Returns:The method used when calling the webhook’s URL.
Return type:WebhookInstance.Methods
webhook_url
Returns:The URL associated with this Webhook.
Return type:unicode
class twilio.rest.verify.v2.service.webhook.WebhookList(version, service_sid)[source]

Bases: twilio.base.list_resource.ListResource

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

create(friendly_name, event_types, webhook_url, status=<object object>, version=<object object>)[source]

Create the WebhookInstance

Parameters:
  • friendly_name (unicode) – The string that you assigned to describe the webhook
  • event_types (list[unicode]) – The array of events that this Webhook is subscribed to.
  • webhook_url (unicode) – The URL associated with this Webhook.
  • status (WebhookInstance.Status) – The webhook status
  • version (WebhookInstance.Version) – The webhook version
Returns:

The created WebhookInstance

Return type:

twilio.rest.verify.v2.service.webhook.WebhookInstance

get(sid)[source]

Constructs a WebhookContext

Parameters:sid – The unique string that identifies the resource to fetch
Returns:twilio.rest.verify.v2.service.webhook.WebhookContext
Return type:twilio.rest.verify.v2.service.webhook.WebhookContext
get_page(target_url)[source]

Retrieve a specific page of WebhookInstance records from the API. Request is executed immediately

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of WebhookInstance
Return type:twilio.rest.verify.v2.service.webhook.WebhookPage
list(limit=None, page_size=None)[source]

Lists WebhookInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.

Parameters:
  • limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.verify.v2.service.webhook.WebhookInstance]

page(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

Retrieve a single page of WebhookInstance records from the API. Request is executed immediately

Parameters:
  • page_token (str) – PageToken provided by the API
  • page_number (int) – Page Number, this value is simply for client state
  • page_size (int) – Number of records to return, defaults to 50
Returns:

Page of WebhookInstance

Return type:

twilio.rest.verify.v2.service.webhook.WebhookPage

stream(limit=None, page_size=None)[source]

Streams WebhookInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.

Parameters:
  • limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.verify.v2.service.webhook.WebhookInstance]

class twilio.rest.verify.v2.service.webhook.WebhookPage(version, response, solution)[source]

Bases: twilio.base.page.Page

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

get_instance(payload)[source]

Build an instance of WebhookInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.verify.v2.service.webhook.WebhookInstance
Return type:twilio.rest.verify.v2.service.webhook.WebhookInstance

Module contents

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.verify.v2.service.ServiceContext(version, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

access_tokens

Access the access_tokens

Returns:twilio.rest.verify.v2.service.access_token.AccessTokenList
Return type:twilio.rest.verify.v2.service.access_token.AccessTokenList
delete()[source]

Deletes the ServiceInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
entities

Access the entities

Returns:twilio.rest.verify.v2.service.entity.EntityList
Return type:twilio.rest.verify.v2.service.entity.EntityList
fetch()[source]

Fetch the ServiceInstance

Returns:The fetched ServiceInstance
Return type:twilio.rest.verify.v2.service.ServiceInstance
messaging_configurations

Access the messaging_configurations

Returns:twilio.rest.verify.v2.service.messaging_configuration.MessagingConfigurationList
Return type:twilio.rest.verify.v2.service.messaging_configuration.MessagingConfigurationList
rate_limits

Access the rate_limits

Returns:twilio.rest.verify.v2.service.rate_limit.RateLimitList
Return type:twilio.rest.verify.v2.service.rate_limit.RateLimitList
update(friendly_name=<object object>, code_length=<object object>, lookup_enabled=<object object>, skip_sms_to_landlines=<object object>, dtmf_input_required=<object object>, tts_name=<object object>, psd2_enabled=<object object>, do_not_share_warning_enabled=<object object>, custom_code_enabled=<object object>, push_include_date=<object object>, push_apn_credential_sid=<object object>, push_fcm_credential_sid=<object object>, totp_issuer=<object object>, totp_time_step=<object object>, totp_code_length=<object object>, totp_skew=<object object>, default_template_sid=<object object>)[source]

Update the ServiceInstance

Parameters:
  • friendly_name (unicode) – A string to describe the verification service
  • code_length (unicode) – The length of the verification code to generate
  • lookup_enabled (bool) – Whether to perform a lookup with each verification
  • skip_sms_to_landlines (bool) – Whether to skip sending SMS verifications to landlines
  • dtmf_input_required (bool) – Whether to ask the user to press a number before delivering the verify code in a phone call
  • tts_name (unicode) – The name of an alternative text-to-speech service to use in phone calls
  • psd2_enabled (bool) – Whether to pass PSD2 transaction parameters when starting a verification
  • do_not_share_warning_enabled (bool) – Whether to add a privacy warning at the end of an SMS.
  • custom_code_enabled (bool) – Whether to allow sending verifications with a custom code.
  • push_include_date (bool) – Optional. Include the date in the Challenge’s reponse. Default: true
  • push_apn_credential_sid (unicode) – Optional. Set APN Credential for this service.
  • push_fcm_credential_sid (unicode) – Optional. Set FCM Credential for this service.
  • totp_issuer (unicode) – Optional. Set TOTP Issuer for this service.
  • totp_time_step (unicode) – Optional. How often, in seconds, are TOTP codes generated
  • totp_code_length (unicode) – Optional. Number of digits for generated TOTP codes
  • totp_skew (unicode) – Optional. The number of past and future time-steps valid at a given time
  • default_template_sid (unicode) – The verification template SMS messages.
Returns:

The updated ServiceInstance

Return type:

twilio.rest.verify.v2.service.ServiceInstance

verification_checks

Access the verification_checks

Returns:twilio.rest.verify.v2.service.verification_check.VerificationCheckList
Return type:twilio.rest.verify.v2.service.verification_check.VerificationCheckList
verifications

Access the verifications

Returns:twilio.rest.verify.v2.service.verification.VerificationList
Return type:twilio.rest.verify.v2.service.verification.VerificationList
webhooks

Access the webhooks

Returns:twilio.rest.verify.v2.service.webhook.WebhookList
Return type:twilio.rest.verify.v2.service.webhook.WebhookList
class twilio.rest.verify.v2.service.ServiceInstance(version, payload, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

access_tokens

Access the access_tokens

Returns:twilio.rest.verify.v2.service.access_token.AccessTokenList
Return type:twilio.rest.verify.v2.service.access_token.AccessTokenList
account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
code_length
Returns:The length of the verification code
Return type:unicode
custom_code_enabled
Returns:Whether to allow sending verifications with a custom code.
Return type:bool
date_created
Returns:The RFC 2822 date and time in GMT when the resource was created
Return type:datetime
date_updated
Returns:The RFC 2822 date and time in GMT when the resource was last updated
Return type:datetime
default_template_sid
Returns:The default_template_sid
Return type:unicode
delete()[source]

Deletes the ServiceInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
do_not_share_warning_enabled
Returns:Whether to add a security warning at the end of an SMS.
Return type:bool
dtmf_input_required
Returns:Whether to ask the user to press a number before delivering the verify code in a phone call
Return type:bool
entities

Access the entities

Returns:twilio.rest.verify.v2.service.entity.EntityList
Return type:twilio.rest.verify.v2.service.entity.EntityList
fetch()[source]

Fetch the ServiceInstance

Returns:The fetched ServiceInstance
Return type:twilio.rest.verify.v2.service.ServiceInstance
friendly_name
Returns:The string that you assigned to describe the verification service
Return type:unicode
Returns:The URLs of related resources
Return type:unicode
lookup_enabled
Returns:Whether to perform a lookup with each verification
Return type:bool
messaging_configurations

Access the messaging_configurations

Returns:twilio.rest.verify.v2.service.messaging_configuration.MessagingConfigurationList
Return type:twilio.rest.verify.v2.service.messaging_configuration.MessagingConfigurationList
psd2_enabled
Returns:Whether to pass PSD2 transaction parameters when starting a verification
Return type:bool
push
Returns:The service level configuration of factor push type.
Return type:dict
rate_limits

Access the rate_limits

Returns:twilio.rest.verify.v2.service.rate_limit.RateLimitList
Return type:twilio.rest.verify.v2.service.rate_limit.RateLimitList
sid
Returns:The unique string that identifies the resource
Return type:unicode
skip_sms_to_landlines
Returns:Whether to skip sending SMS verifications to landlines
Return type:bool
totp
Returns:The service level configuration of factor TOTP type.
Return type:dict
tts_name
Returns:The name of an alternative text-to-speech service to use in phone calls
Return type:unicode
update(friendly_name=<object object>, code_length=<object object>, lookup_enabled=<object object>, skip_sms_to_landlines=<object object>, dtmf_input_required=<object object>, tts_name=<object object>, psd2_enabled=<object object>, do_not_share_warning_enabled=<object object>, custom_code_enabled=<object object>, push_include_date=<object object>, push_apn_credential_sid=<object object>, push_fcm_credential_sid=<object object>, totp_issuer=<object object>, totp_time_step=<object object>, totp_code_length=<object object>, totp_skew=<object object>, default_template_sid=<object object>)[source]

Update the ServiceInstance

Parameters:
  • friendly_name (unicode) – A string to describe the verification service
  • code_length (unicode) – The length of the verification code to generate
  • lookup_enabled (bool) – Whether to perform a lookup with each verification
  • skip_sms_to_landlines (bool) – Whether to skip sending SMS verifications to landlines
  • dtmf_input_required (bool) – Whether to ask the user to press a number before delivering the verify code in a phone call
  • tts_name (unicode) – The name of an alternative text-to-speech service to use in phone calls
  • psd2_enabled (bool) – Whether to pass PSD2 transaction parameters when starting a verification
  • do_not_share_warning_enabled (bool) – Whether to add a privacy warning at the end of an SMS.
  • custom_code_enabled (bool) – Whether to allow sending verifications with a custom code.
  • push_include_date (bool) – Optional. Include the date in the Challenge’s reponse. Default: true
  • push_apn_credential_sid (unicode) – Optional. Set APN Credential for this service.
  • push_fcm_credential_sid (unicode) – Optional. Set FCM Credential for this service.
  • totp_issuer (unicode) – Optional. Set TOTP Issuer for this service.
  • totp_time_step (unicode) – Optional. How often, in seconds, are TOTP codes generated
  • totp_code_length (unicode) – Optional. Number of digits for generated TOTP codes
  • totp_skew (unicode) – Optional. The number of past and future time-steps valid at a given time
  • default_template_sid (unicode) – The verification template SMS messages.
Returns:

The updated ServiceInstance

Return type:

twilio.rest.verify.v2.service.ServiceInstance

url
Returns:The absolute URL of the resource
Return type:unicode
verification_checks

Access the verification_checks

Returns:twilio.rest.verify.v2.service.verification_check.VerificationCheckList
Return type:twilio.rest.verify.v2.service.verification_check.VerificationCheckList
verifications

Access the verifications

Returns:twilio.rest.verify.v2.service.verification.VerificationList
Return type:twilio.rest.verify.v2.service.verification.VerificationList
webhooks

Access the webhooks

Returns:twilio.rest.verify.v2.service.webhook.WebhookList
Return type:twilio.rest.verify.v2.service.webhook.WebhookList
class twilio.rest.verify.v2.service.ServiceList(version)[source]

Bases: twilio.base.list_resource.ListResource

create(friendly_name, code_length=<object object>, lookup_enabled=<object object>, skip_sms_to_landlines=<object object>, dtmf_input_required=<object object>, tts_name=<object object>, psd2_enabled=<object object>, do_not_share_warning_enabled=<object object>, custom_code_enabled=<object object>, push_include_date=<object object>, push_apn_credential_sid=<object object>, push_fcm_credential_sid=<object object>, totp_issuer=<object object>, totp_time_step=<object object>, totp_code_length=<object object>, totp_skew=<object object>, default_template_sid=<object object>)[source]

Create the ServiceInstance

Parameters:
  • friendly_name (unicode) – A string to describe the verification service
  • code_length (unicode) – The length of the verification code to generate
  • lookup_enabled (bool) – Whether to perform a lookup with each verification
  • skip_sms_to_landlines (bool) – Whether to skip sending SMS verifications to landlines
  • dtmf_input_required (bool) – Whether to ask the user to press a number before delivering the verify code in a phone call
  • tts_name (unicode) – The name of an alternative text-to-speech service to use in phone calls
  • psd2_enabled (bool) – Whether to pass PSD2 transaction parameters when starting a verification
  • do_not_share_warning_enabled (bool) – Whether to add a security warning at the end of an SMS.
  • custom_code_enabled (bool) – Whether to allow sending verifications with a custom code.
  • push_include_date (bool) – Optional. Include the date in the Challenge’s reponse. Default: true
  • push_apn_credential_sid (unicode) – Optional. Set APN Credential for this service.
  • push_fcm_credential_sid (unicode) – Optional. Set FCM Credential for this service.
  • totp_issuer (unicode) – Optional. Set TOTP Issuer for this service.
  • totp_time_step (unicode) – Optional. How often, in seconds, are TOTP codes generated
  • totp_code_length (unicode) – Optional. Number of digits for generated TOTP codes
  • totp_skew (unicode) – Optional. The number of past and future time-steps valid at a given time
  • default_template_sid (unicode) – The verification template SMS messages.
Returns:

The created ServiceInstance

Return type:

twilio.rest.verify.v2.service.ServiceInstance

get(sid)[source]

Constructs a ServiceContext

Parameters:sid – The unique string that identifies the resource
Returns:twilio.rest.verify.v2.service.ServiceContext
Return type:twilio.rest.verify.v2.service.ServiceContext
get_page(target_url)[source]

Retrieve a specific page of ServiceInstance records from the API. Request is executed immediately

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of ServiceInstance
Return type:twilio.rest.verify.v2.service.ServicePage
list(limit=None, page_size=None)[source]

Lists ServiceInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.

Parameters:
  • limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.verify.v2.service.ServiceInstance]

page(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

Retrieve a single page of ServiceInstance records from the API. Request is executed immediately

Parameters:
  • page_token (str) – PageToken provided by the API
  • page_number (int) – Page Number, this value is simply for client state
  • page_size (int) – Number of records to return, defaults to 50
Returns:

Page of ServiceInstance

Return type:

twilio.rest.verify.v2.service.ServicePage

stream(limit=None, page_size=None)[source]

Streams ServiceInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.

Parameters:
  • limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.verify.v2.service.ServiceInstance]

class twilio.rest.verify.v2.service.ServicePage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of ServiceInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.verify.v2.service.ServiceInstance
Return type:twilio.rest.verify.v2.service.ServiceInstance