Skip to content

Commit

Permalink
Merge pull request #117 from Vonage/feature/add-verify-v2-snippets
Browse files Browse the repository at this point in the history
verify v2 snippets
  • Loading branch information
SecondeJK committed May 18, 2023
2 parents a238c82 + 891dc17 commit f06c6ea
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
8 changes: 8 additions & 0 deletions verify2/cancel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
source "../config.sh"
source "../jwt.sh"

curl --X DELETE \
--url https://api.nexmo.com/v2/verify/$REQUEST_ID \
-H "Authorization: Bearer "$JWT\
-H 'Content-Type: application/json'
11 changes: 11 additions & 0 deletions verify2/check_code.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
source "../config.sh"
source "../jwt.sh"

curl --X POST \
--url https://api.nexmo.com/v2/verify/$REQUEST_ID \
-H "Authorization: Bearer "$JWT\
-H 'Content-Type: application/json' \
-d '{
"code": "1234"
}'
22 changes: 22 additions & 0 deletions verify2/request.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
source "../config.sh"
source "../jwt.sh"

curl --X POST \
--url https://api.nexmo.com/v2/verify \
-H "Authorization: Bearer "$JWT\
-H 'Content-Type: application/json' \
-d '{
"brand": "ACME, Inc",
"workflow": [
{
"channel": "silent_auth",
"to": 447738066610
},
{
"channel": "email",
"to": "alice@company.com"
"from": "bob@company.com"
}
]
}'

0 comments on commit f06c6ea

Please sign in to comment.