Search for a Verify Request

You can use the search functionality to see the current status or eventual outcome of a Verify request, using the request_id returned when the verify code was sent.

Replace the following variables in the sample code with your own values:

Name Description
NEXMO_API_KEY Your Nexmo API key
NEXMO_API_SECRET Your Nexmo API secret
REQUEST_ID The ID of the Verify request you wish to cancel (this is returned in the API response when you send a verification code)

Write the code

Add the following to search-for-verify-request.sh:

Copy to Clipboard
curl -X GET "https://api.nexmo.com/verify/search/json?&api_key=$NEXMO_API_KEY&api_secret=$NEXMO_API_SECRET&request_id=$REQUEST_ID"

View full source

Run your code

Save this file to your machine and run it:

sh search-for-verify-request.sh