-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
157 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,35 @@ | ||
import os | ||
from os.path import join, dirname | ||
from pprint import pprint | ||
from dotenv import load_dotenv | ||
|
||
dotenv_path = join(dirname(__file__), "../.env") | ||
load_dotenv(dotenv_path) | ||
|
||
VONAGE_APPLICATION_ID = os.environ.get("VONAGE_APPLICATION_ID") | ||
VONAGE_APPLICATION_PRIVATE_KEY_PATH = os.environ.get("VONAGE_APPLICATION_PRIVATE_KEY_PATH") | ||
VONAGE_APPLICATION_PRIVATE_KEY_PATH = os.environ.get( | ||
"VONAGE_APPLICATION_PRIVATE_KEY_PATH" | ||
) | ||
|
||
BRAND_NAME = os.environ.get("BRAND_NAME") | ||
TO_EMAIL = os.environ.get("TO_EMAIL") | ||
|
||
import vonage | ||
from vonage import Auth, Vonage | ||
from vonage_verify import EmailChannel, StartVerificationResponse, VerifyRequest | ||
|
||
client = vonage.Client( | ||
application_id=VONAGE_APPLICATION_ID, | ||
private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH, | ||
client = Vonage( | ||
Auth( | ||
application_id=VONAGE_APPLICATION_ID, | ||
private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH, | ||
) | ||
) | ||
|
||
params = { | ||
'brand': BRAND_NAME, | ||
'workflow': [ | ||
{'channel': 'email', 'to': TO_EMAIL}, | ||
verify_request = VerifyRequest( | ||
brand=BRAND_NAME, | ||
workflow=[ | ||
EmailChannel(to=TO_EMAIL), | ||
], | ||
} | ||
) | ||
|
||
client.verify2.new_request(params) | ||
response: StartVerificationResponse = client.verify.start_verification(verify_request) | ||
pprint(response) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,33 @@ | ||
import os | ||
from os.path import join, dirname | ||
from pprint import pprint | ||
from dotenv import load_dotenv | ||
|
||
dotenv_path = join(dirname(__file__), "../.env") | ||
load_dotenv(dotenv_path) | ||
|
||
VONAGE_APPLICATION_ID = os.environ.get("VONAGE_APPLICATION_ID") | ||
VONAGE_APPLICATION_PRIVATE_KEY_PATH = os.environ.get("VONAGE_APPLICATION_PRIVATE_KEY_PATH") | ||
VONAGE_APPLICATION_PRIVATE_KEY_PATH = os.environ.get( | ||
"VONAGE_APPLICATION_PRIVATE_KEY_PATH" | ||
) | ||
|
||
BRAND_NAME = os.environ.get("BRAND_NAME") | ||
TO_NUMBER = os.environ.get("TO_NUMBER") | ||
|
||
import vonage | ||
from vonage import Auth, Vonage | ||
from vonage_verify import SilentAuthChannel, StartVerificationResponse, VerifyRequest | ||
|
||
client = vonage.Client( | ||
application_id=VONAGE_APPLICATION_ID, | ||
private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH, | ||
client = Vonage( | ||
Auth( | ||
application_id=VONAGE_APPLICATION_ID, | ||
private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH, | ||
) | ||
) | ||
|
||
params = { | ||
'brand': BRAND_NAME, | ||
'workflow': [ | ||
{'channel': 'silent_auth', 'to': TO_NUMBER}, | ||
], | ||
} | ||
verify_request = VerifyRequest( | ||
brand=BRAND_NAME, | ||
workflow=[SilentAuthChannel(to=TO_NUMBER)], | ||
) | ||
|
||
client.verify2.new_request(params) | ||
response: StartVerificationResponse = client.verify.start_verification(verify_request) | ||
pprint(response) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,35 @@ | ||
import os | ||
from os.path import join, dirname | ||
from pprint import pprint | ||
from dotenv import load_dotenv | ||
|
||
dotenv_path = join(dirname(__file__), "../.env") | ||
load_dotenv(dotenv_path) | ||
|
||
VONAGE_APPLICATION_ID = os.environ.get("VONAGE_APPLICATION_ID") | ||
VONAGE_APPLICATION_PRIVATE_KEY_PATH = os.environ.get("VONAGE_APPLICATION_PRIVATE_KEY_PATH") | ||
VONAGE_APPLICATION_PRIVATE_KEY_PATH = os.environ.get( | ||
"VONAGE_APPLICATION_PRIVATE_KEY_PATH" | ||
) | ||
|
||
BRAND_NAME = os.environ.get("BRAND_NAME") | ||
TO_NUMBER = os.environ.get("TO_NUMBER") | ||
|
||
import vonage | ||
from vonage import Auth, Vonage | ||
from vonage_verify import SmsChannel, StartVerificationResponse, VerifyRequest | ||
|
||
client = vonage.Client( | ||
application_id=VONAGE_APPLICATION_ID, | ||
private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH, | ||
client = Vonage( | ||
Auth( | ||
application_id=VONAGE_APPLICATION_ID, | ||
private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH, | ||
) | ||
) | ||
|
||
params = { | ||
'brand': BRAND_NAME, | ||
'workflow': [ | ||
{'channel': 'sms', 'to': TO_NUMBER}, | ||
verify_request = VerifyRequest( | ||
brand=BRAND_NAME, | ||
workflow=[ | ||
SmsChannel(to=TO_NUMBER), | ||
], | ||
} | ||
) | ||
|
||
client.verify2.new_request(params) | ||
response: StartVerificationResponse = client.verify.start_verification(verify_request) | ||
pprint(response) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,35 @@ | ||
import os | ||
from os.path import join, dirname | ||
from pprint import pprint | ||
from dotenv import load_dotenv | ||
|
||
dotenv_path = join(dirname(__file__), "../.env") | ||
load_dotenv(dotenv_path) | ||
|
||
VONAGE_APPLICATION_ID = os.environ.get("VONAGE_APPLICATION_ID") | ||
VONAGE_APPLICATION_PRIVATE_KEY_PATH = os.environ.get("VONAGE_APPLICATION_PRIVATE_KEY_PATH") | ||
VONAGE_APPLICATION_PRIVATE_KEY_PATH = os.environ.get( | ||
"VONAGE_APPLICATION_PRIVATE_KEY_PATH" | ||
) | ||
|
||
BRAND_NAME = os.environ.get("BRAND_NAME") | ||
TO_NUMBER = os.environ.get("TO_NUMBER") | ||
|
||
import vonage | ||
from vonage import Auth, Vonage | ||
from vonage_verify import StartVerificationResponse, VerifyRequest, VoiceChannel | ||
|
||
client = vonage.Client( | ||
application_id=VONAGE_APPLICATION_ID, | ||
private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH, | ||
client = Vonage( | ||
Auth( | ||
application_id=VONAGE_APPLICATION_ID, | ||
private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH, | ||
) | ||
) | ||
|
||
params = { | ||
'brand': BRAND_NAME, | ||
'workflow': [ | ||
{'channel': 'voice', 'to': TO_NUMBER}, | ||
verify_request = VerifyRequest( | ||
brand=BRAND_NAME, | ||
workflow=[ | ||
VoiceChannel(to=TO_NUMBER), | ||
], | ||
} | ||
) | ||
|
||
client.verify2.new_request(params) | ||
response: StartVerificationResponse = client.verify.start_verification(verify_request) | ||
pprint(response) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,36 @@ | ||
import os | ||
from os.path import join, dirname | ||
from pprint import pprint | ||
from dotenv import load_dotenv | ||
|
||
dotenv_path = join(dirname(__file__), "../.env") | ||
load_dotenv(dotenv_path) | ||
|
||
VONAGE_APPLICATION_ID = os.environ.get("VONAGE_APPLICATION_ID") | ||
VONAGE_APPLICATION_PRIVATE_KEY_PATH = os.environ.get("VONAGE_APPLICATION_PRIVATE_KEY_PATH") | ||
VONAGE_APPLICATION_PRIVATE_KEY_PATH = os.environ.get( | ||
"VONAGE_APPLICATION_PRIVATE_KEY_PATH" | ||
) | ||
|
||
BRAND_NAME = os.environ.get("BRAND_NAME") | ||
TO_NUMBER = os.environ.get("TO_NUMBER") | ||
WHATSAPP_BUSINESS_NUMBER = os.environ.get("WHATSAPP_BUSINESS_NUMBER") | ||
|
||
import vonage | ||
from vonage import Auth, Vonage | ||
from vonage_verify import StartVerificationResponse, VerifyRequest, WhatsappChannel | ||
|
||
client = vonage.Client( | ||
application_id=VONAGE_APPLICATION_ID, | ||
private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH, | ||
client = Vonage( | ||
Auth( | ||
application_id=VONAGE_APPLICATION_ID, | ||
private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH, | ||
) | ||
) | ||
|
||
params = { | ||
'brand': BRAND_NAME, | ||
'workflow': [ | ||
{'channel': 'whatsapp_interactive', 'to': TO_NUMBER}, | ||
verify_request = VerifyRequest( | ||
brand=BRAND_NAME, | ||
workflow=[ | ||
WhatsappChannel(to=TO_NUMBER, from_=WHATSAPP_BUSINESS_NUMBER), | ||
], | ||
} | ||
) | ||
|
||
client.verify2.new_request(params) | ||
response: StartVerificationResponse = client.verify.start_verification(verify_request) | ||
pprint(response) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,36 @@ | ||
import os | ||
from os.path import join, dirname | ||
from pprint import pprint | ||
from dotenv import load_dotenv | ||
|
||
dotenv_path = join(dirname(__file__), "../.env") | ||
load_dotenv(dotenv_path) | ||
|
||
VONAGE_APPLICATION_ID = os.environ.get("VONAGE_APPLICATION_ID") | ||
VONAGE_APPLICATION_PRIVATE_KEY_PATH = os.environ.get("VONAGE_APPLICATION_PRIVATE_KEY_PATH") | ||
VONAGE_APPLICATION_PRIVATE_KEY_PATH = os.environ.get( | ||
"VONAGE_APPLICATION_PRIVATE_KEY_PATH" | ||
) | ||
|
||
BRAND_NAME = os.environ.get("BRAND_NAME") | ||
TO_NUMBER = os.environ.get("TO_NUMBER") | ||
WHATSAPP_BUSINESS_NUMBER = os.environ.get("WHATSAPP_BUSINESS_NUMBER") | ||
|
||
import vonage | ||
from vonage import Auth, Vonage | ||
from vonage_verify import StartVerificationResponse, VerifyRequest, WhatsappChannel | ||
|
||
client = vonage.Client( | ||
application_id=VONAGE_APPLICATION_ID, | ||
private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH, | ||
client = Vonage( | ||
Auth( | ||
application_id=VONAGE_APPLICATION_ID, | ||
private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH, | ||
) | ||
) | ||
|
||
params = { | ||
'brand': BRAND_NAME, | ||
'workflow': [ | ||
{'channel': 'whatsapp', 'to': TO_NUMBER}, | ||
verify_request = VerifyRequest( | ||
brand=BRAND_NAME, | ||
workflow=[ | ||
WhatsappChannel(to=TO_NUMBER, from_=WHATSAPP_BUSINESS_NUMBER), | ||
], | ||
} | ||
) | ||
|
||
client.verify2.new_request(params) | ||
response: StartVerificationResponse = client.verify.start_verification(verify_request) | ||
pprint(response) |
Oops, something went wrong.