Vonage Verify V2 Package
This package contains the code to use Vonage's Verify v2 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 v2 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_v2 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_v2.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_v2.start_verification(verify_request)
Check a Verification Code
vonage_client.verify_v2.check_code(request_id='my_request_id', code='1234')
Cancel a Verification
vonage_client.verify_v2.cancel_verification('my_request_id')
Trigger the Next Workflow Event
vonage_client.verify_v2.trigger_next_workflow('my_request_id')
Metadata
Release files for vonage-verify-v2 1.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vonage_verify_v2-1.1.4.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vonage_verify_v2-1.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.4 kB
Release files / vonage_verify_v2-1.1.4.tar.gz
| Download URL | vonage_verify_v2-1.1.4.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
187a96333ffb0ae9578e9e70fdb7467277e57801bb28eb430e02d2a076edfe2b
|
|
BLAKE2b-256 checksum How to use checksums |
0a23b0cbac249e393671a6de01e94727587d4ec8251567e07cf4f86f2289b919
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.4
|
Release files / vonage_verify_v2-1.1.4-py3-none-any.whl
| Download URL | vonage_verify_v2-1.1.4-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
56ab7ce142b6992a718882ae13921ac66d42d25be262a97d06490189b67c99cc
|
|
BLAKE2b-256 checksum How to use checksums |
81a81219a42c2ace332824a1391dacfc719e0ff078bd12e55789d6c9c2da17d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.4
|