Cancel verification request

Cancel a previously triggered a verification request using a request_id.

curl "https://api.nexmo.com/verify/control/json?api_key=API_KEY&api_secret=API_SECRET&request_id=REQUEST_ID&cmd=cancel"
var nexmo = new Nexmo({
  apiKey: NEXMO_API_KEY,
  apiSecret: NEXMO_API_SECRET
}, {
  debug:true
});

nexmo.verify.control({request_id: REQUEST_ID, cmd: 'cancel'}, function(err, result) {
  if(err) { console.error(err); }
  else {
    console.log(result);
  }
});
$client = new Nexmo\Client(new Nexmo\Client\Credentials\Basic(API_KEY, API_SECRET));

$verification = new \Nexmo\Verify\Verification(REQUEST_ID);
$client->verify()->cancel($verification);
import nexmo
client = nexmo.Client(key=API_KEY, secret=API_SECRET)

client.cancel_verification(REQUEST_ID)
require 'nexmo'

client = Nexmo::Client.new(api_key: API_KEY, api_secret: API_SECRET)

client.verify.cancel(REQUEST_ID)

Guides

Building Blocks

Reference