Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Verify interactive example #148

Open
tommorris opened this issue Sep 6, 2017 · 1 comment
Open

Verify interactive example #148

tommorris opened this issue Sep 6, 2017 · 1 comment

Comments

@tommorris
Copy link

It'd be useful to have an interactive example for Verify built into the CLI.

Something like this:

$ nexmo verify:example

What number would you like to verify?
> +44 207 1234567
Which language? [default: en-us]
> en-gb
What brand? [default: MyApp]
> Steve's Dog Treats

Verify request sent
{{ copy of HTTP request/response }}

Type in the code you have just received by SMS.
Type 's' or 'skip' to skip to next verification event.
Type 'c' or 'cancel' to cancel verification.
> 1234
CORRECT
{{ copy of HTTP request/response }}

Cost of transaction: €0.10

Or if they chose to skip.

> skip
Skipping to phone call.

{{ copy of HTTP request/response }}

> cancel
Cancelling reuqest.
{{ copy of HTTP request/response }}

The purpose of this is to enable developers to more easily test the Verify API to see if it matches the needs of the developer (or their employer etc.).

@sammachin
Copy link
Contributor

Seems like a good idea but it shouldn't be interactive, the rest of the CLI isn't and its designed as an admin tool rather than a testing tool.

But having several commands for each stage seems like a good idea so
nexmo verify:start [NUMBER] [BRAND] - returns the ID
nexmo verify:code [ID] [CODE] - checks the code against the ID and returns pass/fail
nexmo verify:skip [ID] - skips the next stage
nexmo verify:cancel [ID - cancels the verification

This wasy is more in keeping with the rest of the CLI and allows you to use a single part of the CLI with a verify request that may be made outside the CLI, for example I just want to cancel a request that my code sent and I have the ID

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants