Skip to main content

Vonage verify package

Project description

Vonage Verify Package

This package contains the code to use Vonage's Verify API in Python. This package includes methods for working with 2-factor authentication (2FA) messages sent via SMS, Voice, WhatsApp and Email. You can also make Silent Authentication requests with Verify to give your end user a more seamless experience.

Usage

It is recommended to use this as part of the main vonage package. The examples below assume you've created an instance of the vonage.Vonage class called vonage_client.

Make a Verify Request

from vonage_verify import VerifyRequest, SmsChannel
# All channels have associated models
sms_channel = SmsChannel(to='1234567890')
params = {
    'brand': 'Vonage',
    'workflow': [sms_channel],
}
verify_request = VerifyRequest(**params)

response = vonage_client.verify.start_verification(verify_request)

If using silent authentication, the response will include a check_url field with a url that should be accessed on the user's device to proceed with silent authentication. If used, silent auth must be the first element in the workflow list.

silent_auth_channel = SilentAuthChannel(channel=ChannelType.SILENT_AUTH, to='1234567890')
sms_channel = SmsChannel(to='1234567890')
params = {
    'brand': 'Vonage',
    'workflow': [silent_auth_channel, sms_channel],
}
verify_request = VerifyRequest(**params)

response = vonage_client.verify.start_verification(verify_request)

Check a Verification Code

vonage_client.verify.check_code(request_id='my_request_id', code='1234')

Cancel a Verification

vonage_client.verify.cancel_verification('my_request_id')

Trigger the Next Workflow Event

vonage_client.verify.trigger_next_workflow('my_request_id')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vonage_verify-2.1.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vonage_verify-2.1.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file vonage_verify-2.1.0.tar.gz.

File metadata

  • Download URL: vonage_verify-2.1.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.4

File hashes

Hashes for vonage_verify-2.1.0.tar.gz
Algorithm Hash digest
SHA256 859895253ec7b95f8cddb977e99a567a217f87dd9bd435dce7d3336fdebd5d3a
MD5 df9b13a8add70a748fddcdce7925f8ef
BLAKE2b-256 721eda7bb499f705b0f86954df2778159aa4f36963b8154d4bc48874ff6e4b3e

See more details on using hashes here.

File details

Details for the file vonage_verify-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: vonage_verify-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.4

File hashes

Hashes for vonage_verify-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 842938860b9041e8ccda0baf9bc4987bf956aa42c62ace4f4be407ae57271d56
MD5 68043170eb1a34186d263fa3db74170e
BLAKE2b-256 b2b9d38eaadc229b045be4a9e5bcaff8f7da5c47cb9b4d7ee69aeaf604d99a14

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page