POST Request a network unblock
{{baseUrl}}/network-unblock
BODY json

{
  "network": "",
  "unblock_duration": 0
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/network-unblock");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"network\": \"\",\n  \"unblock_duration\": 0\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/network-unblock" {:content-type :json
                                                            :form-params {:network ""
                                                                          :unblock_duration 0}})
require "http/client"

url = "{{baseUrl}}/network-unblock"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"network\": \"\",\n  \"unblock_duration\": 0\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/network-unblock"),
    Content = new StringContent("{\n  \"network\": \"\",\n  \"unblock_duration\": 0\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/network-unblock");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"network\": \"\",\n  \"unblock_duration\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/network-unblock"

	payload := strings.NewReader("{\n  \"network\": \"\",\n  \"unblock_duration\": 0\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/network-unblock HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 44

{
  "network": "",
  "unblock_duration": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/network-unblock")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"network\": \"\",\n  \"unblock_duration\": 0\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/network-unblock"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"network\": \"\",\n  \"unblock_duration\": 0\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"network\": \"\",\n  \"unblock_duration\": 0\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/network-unblock")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/network-unblock")
  .header("content-type", "application/json")
  .body("{\n  \"network\": \"\",\n  \"unblock_duration\": 0\n}")
  .asString();
const data = JSON.stringify({
  network: '',
  unblock_duration: 0
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/network-unblock');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/network-unblock',
  headers: {'content-type': 'application/json'},
  data: {network: '', unblock_duration: 0}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/network-unblock';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"network":"","unblock_duration":0}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/network-unblock',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "network": "",\n  "unblock_duration": 0\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"network\": \"\",\n  \"unblock_duration\": 0\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/network-unblock")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/network-unblock',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({network: '', unblock_duration: 0}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/network-unblock',
  headers: {'content-type': 'application/json'},
  body: {network: '', unblock_duration: 0},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/network-unblock');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  network: '',
  unblock_duration: 0
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/network-unblock',
  headers: {'content-type': 'application/json'},
  data: {network: '', unblock_duration: 0}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/network-unblock';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"network":"","unblock_duration":0}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"network": @"",
                              @"unblock_duration": @0 };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/network-unblock"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/network-unblock" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"network\": \"\",\n  \"unblock_duration\": 0\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/network-unblock",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'network' => '',
    'unblock_duration' => 0
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/network-unblock', [
  'body' => '{
  "network": "",
  "unblock_duration": 0
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/network-unblock');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'network' => '',
  'unblock_duration' => 0
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'network' => '',
  'unblock_duration' => 0
]));
$request->setRequestUrl('{{baseUrl}}/network-unblock');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/network-unblock' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "network": "",
  "unblock_duration": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/network-unblock' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "network": "",
  "unblock_duration": 0
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"network\": \"\",\n  \"unblock_duration\": 0\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/network-unblock", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/network-unblock"

payload = {
    "network": "",
    "unblock_duration": 0
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/network-unblock"

payload <- "{\n  \"network\": \"\",\n  \"unblock_duration\": 0\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/network-unblock")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"network\": \"\",\n  \"unblock_duration\": 0\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/network-unblock') do |req|
  req.body = "{\n  \"network\": \"\",\n  \"unblock_duration\": 0\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/network-unblock";

    let payload = json!({
        "network": "",
        "unblock_duration": 0
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/network-unblock \
  --header 'content-type: application/json' \
  --data '{
  "network": "",
  "unblock_duration": 0
}'
echo '{
  "network": "",
  "unblock_duration": 0
}' |  \
  http POST {{baseUrl}}/network-unblock \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "network": "",\n  "unblock_duration": 0\n}' \
  --output-document \
  - {{baseUrl}}/network-unblock
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "network": "",
  "unblock_duration": 0
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/network-unblock")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "network": "23410",
  "unblocked_until": "2024-04-22T08:34:58Z"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Your account does not have permission to perform this action.",
  "instance": "bf0ca0bf927b3b52e3cb03217e1a1ddf",
  "title": "Forbidden",
  "type": "https://developer.vonage.com/api-errors#forbidden"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "The network you provided does not have an active block.",
  "instance": "bf0ca0bf927b3b52e3cb03217e1a1ddf",
  "title": "Not Found",
  "type": "https://developer.vonage.com/api-errors#bad-request"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Please wait, then retry your request",
  "instance": "bf0ca0bf927b3b52e3cb03217e1a1ddf",
  "title": "Rate Limit Hit",
  "type": "https://developer.vonage.com/api-errors/verify#rate-limit"
}
POST Request a Verification
{{baseUrl}}/:format
QUERY PARAMS

format
BODY formUrlEncoded

api_key
api_secret
brand
code_length
country
lg
next_event_wait
number
pin_code
pin_expiry
sender_id
workflow_id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:format");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/x-www-form-urlencoded");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "api_key=&api_secret=&brand=&code_length=&country=&lg=&next_event_wait=&number=&pin_code=&pin_expiry=&sender_id=&workflow_id=");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/:format" {:form-params {:api_key ""
                                                                  :api_secret ""
                                                                  :brand ""
                                                                  :code_length ""
                                                                  :country ""
                                                                  :lg ""
                                                                  :next_event_wait ""
                                                                  :number ""
                                                                  :pin_code ""
                                                                  :pin_expiry ""
                                                                  :sender_id ""
                                                                  :workflow_id ""}})
require "http/client"

url = "{{baseUrl}}/:format"
headers = HTTP::Headers{
  "content-type" => "application/x-www-form-urlencoded"
}
reqBody = "api_key=&api_secret=&brand=&code_length=&country=&lg=&next_event_wait=&number=&pin_code=&pin_expiry=&sender_id=&workflow_id="

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/:format"),
    Content = new FormUrlEncodedContent(new Dictionary
    {
        { "api_key", "" },
        { "api_secret", "" },
        { "brand", "" },
        { "code_length", "" },
        { "country", "" },
        { "lg", "" },
        { "next_event_wait", "" },
        { "number", "" },
        { "pin_code", "" },
        { "pin_expiry", "" },
        { "sender_id", "" },
        { "workflow_id", "" },
    }),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:format");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddParameter("application/x-www-form-urlencoded", "api_key=&api_secret=&brand=&code_length=&country=&lg=&next_event_wait=&number=&pin_code=&pin_expiry=&sender_id=&workflow_id=", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/:format"

	payload := strings.NewReader("api_key=&api_secret=&brand=&code_length=&country=&lg=&next_event_wait=&number=&pin_code=&pin_expiry=&sender_id=&workflow_id=")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/x-www-form-urlencoded")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/:format HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: example.com
Content-Length: 124

api_key=&api_secret=&brand=&code_length=&country=&lg=&next_event_wait=&number=&pin_code=&pin_expiry=&sender_id=&workflow_id=
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:format")
  .setHeader("content-type", "application/x-www-form-urlencoded")
  .setBody("api_key=&api_secret=&brand=&code_length=&country=&lg=&next_event_wait=&number=&pin_code=&pin_expiry=&sender_id=&workflow_id=")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/:format"))
    .header("content-type", "application/x-www-form-urlencoded")
    .method("POST", HttpRequest.BodyPublishers.ofString("api_key=&api_secret=&brand=&code_length=&country=&lg=&next_event_wait=&number=&pin_code=&pin_expiry=&sender_id=&workflow_id="))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "api_key=&api_secret=&brand=&code_length=&country=&lg=&next_event_wait=&number=&pin_code=&pin_expiry=&sender_id=&workflow_id=");
Request request = new Request.Builder()
  .url("{{baseUrl}}/:format")
  .post(body)
  .addHeader("content-type", "application/x-www-form-urlencoded")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:format")
  .header("content-type", "application/x-www-form-urlencoded")
  .body("api_key=&api_secret=&brand=&code_length=&country=&lg=&next_event_wait=&number=&pin_code=&pin_expiry=&sender_id=&workflow_id=")
  .asString();
const data = 'api_key=&api_secret=&brand=&code_length=&country=&lg=&next_event_wait=&number=&pin_code=&pin_expiry=&sender_id=&workflow_id=';

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/:format');
xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');

xhr.send(data);
import axios from 'axios';

const encodedParams = new URLSearchParams();
encodedParams.set('api_key', '');
encodedParams.set('api_secret', '');
encodedParams.set('brand', '');
encodedParams.set('code_length', '');
encodedParams.set('country', '');
encodedParams.set('lg', '');
encodedParams.set('next_event_wait', '');
encodedParams.set('number', '');
encodedParams.set('pin_code', '');
encodedParams.set('pin_expiry', '');
encodedParams.set('sender_id', '');
encodedParams.set('workflow_id', '');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:format',
  headers: {'content-type': 'application/x-www-form-urlencoded'},
  data: encodedParams,
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/:format';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/x-www-form-urlencoded'},
  body: new URLSearchParams({
    api_key: '',
    api_secret: '',
    brand: '',
    code_length: '',
    country: '',
    lg: '',
    next_event_wait: '',
    number: '',
    pin_code: '',
    pin_expiry: '',
    sender_id: '',
    workflow_id: ''
  })
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/:format',
  method: 'POST',
  headers: {
    'content-type': 'application/x-www-form-urlencoded'
  },
  data: {
    api_key: '',
    api_secret: '',
    brand: '',
    code_length: '',
    country: '',
    lg: '',
    next_event_wait: '',
    number: '',
    pin_code: '',
    pin_expiry: '',
    sender_id: '',
    workflow_id: ''
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/x-www-form-urlencoded")
val body = RequestBody.create(mediaType, "api_key=&api_secret=&brand=&code_length=&country=&lg=&next_event_wait=&number=&pin_code=&pin_expiry=&sender_id=&workflow_id=")
val request = Request.Builder()
  .url("{{baseUrl}}/:format")
  .post(body)
  .addHeader("content-type", "application/x-www-form-urlencoded")
  .build()

val response = client.newCall(request).execute()
const qs = require('querystring');
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/:format',
  headers: {
    'content-type': 'application/x-www-form-urlencoded'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(qs.stringify({
  api_key: '',
  api_secret: '',
  brand: '',
  code_length: '',
  country: '',
  lg: '',
  next_event_wait: '',
  number: '',
  pin_code: '',
  pin_expiry: '',
  sender_id: '',
  workflow_id: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:format',
  headers: {'content-type': 'application/x-www-form-urlencoded'},
  form: {
    api_key: '',
    api_secret: '',
    brand: '',
    code_length: '',
    country: '',
    lg: '',
    next_event_wait: '',
    number: '',
    pin_code: '',
    pin_expiry: '',
    sender_id: '',
    workflow_id: ''
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/:format');

req.headers({
  'content-type': 'application/x-www-form-urlencoded'
});

req.form({
  api_key: '',
  api_secret: '',
  brand: '',
  code_length: '',
  country: '',
  lg: '',
  next_event_wait: '',
  number: '',
  pin_code: '',
  pin_expiry: '',
  sender_id: '',
  workflow_id: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;
const { URLSearchParams } = require('url');

const encodedParams = new URLSearchParams();
encodedParams.set('api_key', '');
encodedParams.set('api_secret', '');
encodedParams.set('brand', '');
encodedParams.set('code_length', '');
encodedParams.set('country', '');
encodedParams.set('lg', '');
encodedParams.set('next_event_wait', '');
encodedParams.set('number', '');
encodedParams.set('pin_code', '');
encodedParams.set('pin_expiry', '');
encodedParams.set('sender_id', '');
encodedParams.set('workflow_id', '');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/:format',
  headers: {'content-type': 'application/x-www-form-urlencoded'},
  data: encodedParams,
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const { URLSearchParams } = require('url');
const fetch = require('node-fetch');

const encodedParams = new URLSearchParams();
encodedParams.set('api_key', '');
encodedParams.set('api_secret', '');
encodedParams.set('brand', '');
encodedParams.set('code_length', '');
encodedParams.set('country', '');
encodedParams.set('lg', '');
encodedParams.set('next_event_wait', '');
encodedParams.set('number', '');
encodedParams.set('pin_code', '');
encodedParams.set('pin_expiry', '');
encodedParams.set('sender_id', '');
encodedParams.set('workflow_id', '');

const url = '{{baseUrl}}/:format';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/x-www-form-urlencoded'},
  body: encodedParams
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/x-www-form-urlencoded" };

NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"api_key=" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"&api_secret=" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"&brand=" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"&code_length=" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"&country=" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"&lg=" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"&next_event_wait=" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"&number=" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"&pin_code=" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"&pin_expiry=" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"&sender_id=" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"&workflow_id=" dataUsingEncoding:NSUTF8StringEncoding]];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:format"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/:format" in
let headers = Header.add (Header.init ()) "content-type" "application/x-www-form-urlencoded" in
let body = Cohttp_lwt_body.of_string "api_key=&api_secret=&brand=&code_length=&country=&lg=&next_event_wait=&number=&pin_code=&pin_expiry=&sender_id=&workflow_id=" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/:format",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "api_key=&api_secret=&brand=&code_length=&country=&lg=&next_event_wait=&number=&pin_code=&pin_expiry=&sender_id=&workflow_id=",
  CURLOPT_HTTPHEADER => [
    "content-type: application/x-www-form-urlencoded"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/:format', [
  'form_params' => [
    'api_key' => '',
    'api_secret' => '',
    'brand' => '',
    'code_length' => '',
    'country' => '',
    'lg' => '',
    'next_event_wait' => '',
    'number' => '',
    'pin_code' => '',
    'pin_expiry' => '',
    'sender_id' => '',
    'workflow_id' => ''
  ],
  'headers' => [
    'content-type' => 'application/x-www-form-urlencoded',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/:format');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/x-www-form-urlencoded'
]);

$request->setContentType('application/x-www-form-urlencoded');
$request->setPostFields([
  'api_key' => '',
  'api_secret' => '',
  'brand' => '',
  'code_length' => '',
  'country' => '',
  'lg' => '',
  'next_event_wait' => '',
  'number' => '',
  'pin_code' => '',
  'pin_expiry' => '',
  'sender_id' => '',
  'workflow_id' => ''
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(new http\QueryString([
  'api_key' => '',
  'api_secret' => '',
  'brand' => '',
  'code_length' => '',
  'country' => '',
  'lg' => '',
  'next_event_wait' => '',
  'number' => '',
  'pin_code' => '',
  'pin_expiry' => '',
  'sender_id' => '',
  'workflow_id' => ''
]));

$request->setRequestUrl('{{baseUrl}}/:format');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/x-www-form-urlencoded'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/x-www-form-urlencoded")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:format' -Method POST -Headers $headers -ContentType 'application/x-www-form-urlencoded' -Body 'api_key=&api_secret=&brand=&code_length=&country=&lg=&next_event_wait=&number=&pin_code=&pin_expiry=&sender_id=&workflow_id='
$headers=@{}
$headers.Add("content-type", "application/x-www-form-urlencoded")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:format' -Method POST -Headers $headers -ContentType 'application/x-www-form-urlencoded' -Body 'api_key=&api_secret=&brand=&code_length=&country=&lg=&next_event_wait=&number=&pin_code=&pin_expiry=&sender_id=&workflow_id='
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "api_key=&api_secret=&brand=&code_length=&country=&lg=&next_event_wait=&number=&pin_code=&pin_expiry=&sender_id=&workflow_id="

headers = { 'content-type': "application/x-www-form-urlencoded" }

conn.request("POST", "/baseUrl/:format", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/:format"

payload = {
    "api_key": "",
    "api_secret": "",
    "brand": "",
    "code_length": "",
    "country": "",
    "lg": "",
    "next_event_wait": "",
    "number": "",
    "pin_code": "",
    "pin_expiry": "",
    "sender_id": "",
    "workflow_id": ""
}
headers = {"content-type": "application/x-www-form-urlencoded"}

response = requests.post(url, data=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/:format"

payload <- "api_key=&api_secret=&brand=&code_length=&country=&lg=&next_event_wait=&number=&pin_code=&pin_expiry=&sender_id=&workflow_id="

encode <- "form"

response <- VERB("POST", url, body = payload, content_type("application/x-www-form-urlencoded"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/:format")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/x-www-form-urlencoded'
request.body = "api_key=&api_secret=&brand=&code_length=&country=&lg=&next_event_wait=&number=&pin_code=&pin_expiry=&sender_id=&workflow_id="

response = http.request(request)
puts response.read_body
require 'faraday'

data = {
  :api_key => "",
  :api_secret => "",
  :brand => "",
  :code_length => "",
  :country => "",
  :lg => "",
  :next_event_wait => "",
  :number => "",
  :pin_code => "",
  :pin_expiry => "",
  :sender_id => "",
  :workflow_id => "",
}

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/x-www-form-urlencoded'}
)

response = conn.post('/baseUrl/:format') do |req|
  req.body = URI.encode_www_form(data)
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/:format";

    let payload = json!({
        "api_key": "",
        "api_secret": "",
        "brand": "",
        "code_length": "",
        "country": "",
        "lg": "",
        "next_event_wait": "",
        "number": "",
        "pin_code": "",
        "pin_expiry": "",
        "sender_id": "",
        "workflow_id": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/x-www-form-urlencoded".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .form(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/:format \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data api_key= \
  --data api_secret= \
  --data brand= \
  --data code_length= \
  --data country= \
  --data lg= \
  --data next_event_wait= \
  --data number= \
  --data pin_code= \
  --data pin_expiry= \
  --data sender_id= \
  --data workflow_id=
http --form POST {{baseUrl}}/:format \
  content-type:application/x-www-form-urlencoded \
  api_key='' \
  api_secret='' \
  brand='' \
  code_length='' \
  country='' \
  lg='' \
  next_event_wait='' \
  number='' \
  pin_code='' \
  pin_expiry='' \
  sender_id='' \
  workflow_id=''
wget --quiet \
  --method POST \
  --header 'content-type: application/x-www-form-urlencoded' \
  --body-data 'api_key=&api_secret=&brand=&code_length=&country=&lg=&next_event_wait=&number=&pin_code=&pin_expiry=&sender_id=&workflow_id=' \
  --output-document \
  - {{baseUrl}}/:format
import Foundation

let headers = ["content-type": "application/x-www-form-urlencoded"]

let postData = NSMutableData(data: "api_key=".data(using: String.Encoding.utf8)!)
postData.append("&api_secret=".data(using: String.Encoding.utf8)!)
postData.append("&brand=".data(using: String.Encoding.utf8)!)
postData.append("&code_length=".data(using: String.Encoding.utf8)!)
postData.append("&country=".data(using: String.Encoding.utf8)!)
postData.append("&lg=".data(using: String.Encoding.utf8)!)
postData.append("&next_event_wait=".data(using: String.Encoding.utf8)!)
postData.append("&number=".data(using: String.Encoding.utf8)!)
postData.append("&pin_code=".data(using: String.Encoding.utf8)!)
postData.append("&pin_expiry=".data(using: String.Encoding.utf8)!)
postData.append("&sender_id=".data(using: String.Encoding.utf8)!)
postData.append("&workflow_id=".data(using: String.Encoding.utf8)!)

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:format")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "The api_key you supplied is for an account that has been barred from submitting messages.",
  "status": "8"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "The number you are trying to verify is blacklisted for verification.",
  "status": "7"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "The Vonage platform was unable to process this message for the following reason: The request could not be routed.",
  "status": "6"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Concurrent verifications to the same number are not allowed",
  "request_id": "abcdef0123456789abcdef0123456789",
  "status": "10"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Internal Error",
  "status": "5"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Invalid credentials were provided",
  "status": "4"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Invalid value for number",
  "status": "3"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Missing api_key",
  "status": "2"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Your Vonage account is still in demo mode. While in demo mode you must add target numbers to the approved list for your account. Add funds to your account to remove this limitation.",
  "status": "29"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Partner quota exceeded",
  "status": "9"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "The destination number is not in a supported network",
  "status": "15"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "request_id": "abcdef0123456789abcdef0123456789",
  "status": "0"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Throttled",
  "status": "1"
}
POST PSD2 (Payment Services Directive 2) Request
{{baseUrl}}/psd2/:format
QUERY PARAMS

format
BODY formUrlEncoded

amount
api_key
api_secret
code_length
country
lg
next_event_wait
number
payee
pin_expiry
workflow_id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/psd2/:format");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/x-www-form-urlencoded");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/psd2/:format" {:headers {:content-type "application/x-www-form-urlencoded"}})
require "http/client"

url = "{{baseUrl}}/psd2/:format"
headers = HTTP::Headers{
  "content-type" => "application/x-www-form-urlencoded"
}

response = HTTP::Client.post url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/psd2/:format"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/psd2/:format");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/x-www-form-urlencoded");
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/psd2/:format"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("content-type", "application/x-www-form-urlencoded")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/psd2/:format HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/psd2/:format")
  .setHeader("content-type", "application/x-www-form-urlencoded")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/psd2/:format"))
    .header("content-type", "application/x-www-form-urlencoded")
    .method("POST", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/psd2/:format")
  .post(null)
  .addHeader("content-type", "application/x-www-form-urlencoded")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/psd2/:format")
  .header("content-type", "application/x-www-form-urlencoded")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/psd2/:format');
xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/psd2/:format',
  headers: {'content-type': 'application/x-www-form-urlencoded'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/psd2/:format';
const options = {method: 'POST', headers: {'content-type': 'application/x-www-form-urlencoded'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/psd2/:format',
  method: 'POST',
  headers: {
    'content-type': 'application/x-www-form-urlencoded'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/psd2/:format")
  .post(null)
  .addHeader("content-type", "application/x-www-form-urlencoded")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/psd2/:format',
  headers: {
    'content-type': 'application/x-www-form-urlencoded'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/psd2/:format',
  headers: {'content-type': 'application/x-www-form-urlencoded'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/psd2/:format');

req.headers({
  'content-type': 'application/x-www-form-urlencoded'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/psd2/:format',
  headers: {'content-type': 'application/x-www-form-urlencoded'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/psd2/:format';
const options = {method: 'POST', headers: {'content-type': 'application/x-www-form-urlencoded'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/x-www-form-urlencoded" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/psd2/:format"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/psd2/:format" in
let headers = Header.add (Header.init ()) "content-type" "application/x-www-form-urlencoded" in

Client.call ~headers `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/psd2/:format",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => [
    "content-type: application/x-www-form-urlencoded"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/psd2/:format', [
  'headers' => [
    'content-type' => 'application/x-www-form-urlencoded',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/psd2/:format');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/x-www-form-urlencoded'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/psd2/:format');
$request->setRequestMethod('POST');
$request->setHeaders([
  'content-type' => 'application/x-www-form-urlencoded'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/x-www-form-urlencoded")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/psd2/:format' -Method POST -Headers $headers
$headers=@{}
$headers.Add("content-type", "application/x-www-form-urlencoded")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/psd2/:format' -Method POST -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = ""

headers = { 'content-type': "application/x-www-form-urlencoded" }

conn.request("POST", "/baseUrl/psd2/:format", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/psd2/:format"

payload = ""
headers = {"content-type": "application/x-www-form-urlencoded"}

response = requests.post(url, data=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/psd2/:format"

payload <- ""

response <- VERB("POST", url, body = payload, content_type(""))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/psd2/:format")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/x-www-form-urlencoded'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/x-www-form-urlencoded'}
)

response = conn.post('/baseUrl/psd2/:format') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/psd2/:format";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/x-www-form-urlencoded".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/psd2/:format \
  --header 'content-type: application/x-www-form-urlencoded'
http POST {{baseUrl}}/psd2/:format \
  content-type:application/x-www-form-urlencoded
wget --quiet \
  --method POST \
  --header 'content-type: application/x-www-form-urlencoded' \
  --output-document \
  - {{baseUrl}}/psd2/:format
import Foundation

let headers = ["content-type": "application/x-www-form-urlencoded"]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/psd2/:format")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST Verify Check
{{baseUrl}}/check/:format
QUERY PARAMS

format
BODY formUrlEncoded

api_key
api_secret
code
ip_address
request_id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/check/:format");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/x-www-form-urlencoded");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "api_key=&api_secret=&code=&ip_address=&request_id=");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/check/:format" {:form-params {:api_key ""
                                                                        :api_secret ""
                                                                        :code ""
                                                                        :ip_address ""
                                                                        :request_id ""}})
require "http/client"

url = "{{baseUrl}}/check/:format"
headers = HTTP::Headers{
  "content-type" => "application/x-www-form-urlencoded"
}
reqBody = "api_key=&api_secret=&code=&ip_address=&request_id="

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/check/:format"),
    Content = new FormUrlEncodedContent(new Dictionary
    {
        { "api_key", "" },
        { "api_secret", "" },
        { "code", "" },
        { "ip_address", "" },
        { "request_id", "" },
    }),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/check/:format");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddParameter("application/x-www-form-urlencoded", "api_key=&api_secret=&code=&ip_address=&request_id=", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/check/:format"

	payload := strings.NewReader("api_key=&api_secret=&code=&ip_address=&request_id=")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/x-www-form-urlencoded")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/check/:format HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: example.com
Content-Length: 50

api_key=&api_secret=&code=&ip_address=&request_id=
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/check/:format")
  .setHeader("content-type", "application/x-www-form-urlencoded")
  .setBody("api_key=&api_secret=&code=&ip_address=&request_id=")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/check/:format"))
    .header("content-type", "application/x-www-form-urlencoded")
    .method("POST", HttpRequest.BodyPublishers.ofString("api_key=&api_secret=&code=&ip_address=&request_id="))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "api_key=&api_secret=&code=&ip_address=&request_id=");
Request request = new Request.Builder()
  .url("{{baseUrl}}/check/:format")
  .post(body)
  .addHeader("content-type", "application/x-www-form-urlencoded")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/check/:format")
  .header("content-type", "application/x-www-form-urlencoded")
  .body("api_key=&api_secret=&code=&ip_address=&request_id=")
  .asString();
const data = 'api_key=&api_secret=&code=&ip_address=&request_id=';

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/check/:format');
xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');

xhr.send(data);
import axios from 'axios';

const encodedParams = new URLSearchParams();
encodedParams.set('api_key', '');
encodedParams.set('api_secret', '');
encodedParams.set('code', '');
encodedParams.set('ip_address', '');
encodedParams.set('request_id', '');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/check/:format',
  headers: {'content-type': 'application/x-www-form-urlencoded'},
  data: encodedParams,
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/check/:format';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/x-www-form-urlencoded'},
  body: new URLSearchParams({api_key: '', api_secret: '', code: '', ip_address: '', request_id: ''})
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/check/:format',
  method: 'POST',
  headers: {
    'content-type': 'application/x-www-form-urlencoded'
  },
  data: {
    api_key: '',
    api_secret: '',
    code: '',
    ip_address: '',
    request_id: ''
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/x-www-form-urlencoded")
val body = RequestBody.create(mediaType, "api_key=&api_secret=&code=&ip_address=&request_id=")
val request = Request.Builder()
  .url("{{baseUrl}}/check/:format")
  .post(body)
  .addHeader("content-type", "application/x-www-form-urlencoded")
  .build()

val response = client.newCall(request).execute()
const qs = require('querystring');
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/check/:format',
  headers: {
    'content-type': 'application/x-www-form-urlencoded'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(qs.stringify({api_key: '', api_secret: '', code: '', ip_address: '', request_id: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/check/:format',
  headers: {'content-type': 'application/x-www-form-urlencoded'},
  form: {api_key: '', api_secret: '', code: '', ip_address: '', request_id: ''}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/check/:format');

req.headers({
  'content-type': 'application/x-www-form-urlencoded'
});

req.form({
  api_key: '',
  api_secret: '',
  code: '',
  ip_address: '',
  request_id: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;
const { URLSearchParams } = require('url');

const encodedParams = new URLSearchParams();
encodedParams.set('api_key', '');
encodedParams.set('api_secret', '');
encodedParams.set('code', '');
encodedParams.set('ip_address', '');
encodedParams.set('request_id', '');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/check/:format',
  headers: {'content-type': 'application/x-www-form-urlencoded'},
  data: encodedParams,
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const { URLSearchParams } = require('url');
const fetch = require('node-fetch');

const encodedParams = new URLSearchParams();
encodedParams.set('api_key', '');
encodedParams.set('api_secret', '');
encodedParams.set('code', '');
encodedParams.set('ip_address', '');
encodedParams.set('request_id', '');

const url = '{{baseUrl}}/check/:format';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/x-www-form-urlencoded'},
  body: encodedParams
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/x-www-form-urlencoded" };

NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"api_key=" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"&api_secret=" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"&code=" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"&ip_address=" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"&request_id=" dataUsingEncoding:NSUTF8StringEncoding]];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/check/:format"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/check/:format" in
let headers = Header.add (Header.init ()) "content-type" "application/x-www-form-urlencoded" in
let body = Cohttp_lwt_body.of_string "api_key=&api_secret=&code=&ip_address=&request_id=" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/check/:format",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "api_key=&api_secret=&code=&ip_address=&request_id=",
  CURLOPT_HTTPHEADER => [
    "content-type: application/x-www-form-urlencoded"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/check/:format', [
  'form_params' => [
    'api_key' => '',
    'api_secret' => '',
    'code' => '',
    'ip_address' => '',
    'request_id' => ''
  ],
  'headers' => [
    'content-type' => 'application/x-www-form-urlencoded',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/check/:format');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/x-www-form-urlencoded'
]);

$request->setContentType('application/x-www-form-urlencoded');
$request->setPostFields([
  'api_key' => '',
  'api_secret' => '',
  'code' => '',
  'ip_address' => '',
  'request_id' => ''
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(new http\QueryString([
  'api_key' => '',
  'api_secret' => '',
  'code' => '',
  'ip_address' => '',
  'request_id' => ''
]));

$request->setRequestUrl('{{baseUrl}}/check/:format');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/x-www-form-urlencoded'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/x-www-form-urlencoded")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/check/:format' -Method POST -Headers $headers -ContentType 'application/x-www-form-urlencoded' -Body 'api_key=&api_secret=&code=&ip_address=&request_id='
$headers=@{}
$headers.Add("content-type", "application/x-www-form-urlencoded")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/check/:format' -Method POST -Headers $headers -ContentType 'application/x-www-form-urlencoded' -Body 'api_key=&api_secret=&code=&ip_address=&request_id='
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "api_key=&api_secret=&code=&ip_address=&request_id="

headers = { 'content-type': "application/x-www-form-urlencoded" }

conn.request("POST", "/baseUrl/check/:format", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/check/:format"

payload = {
    "api_key": "",
    "api_secret": "",
    "code": "",
    "ip_address": "",
    "request_id": ""
}
headers = {"content-type": "application/x-www-form-urlencoded"}

response = requests.post(url, data=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/check/:format"

payload <- "api_key=&api_secret=&code=&ip_address=&request_id="

encode <- "form"

response <- VERB("POST", url, body = payload, content_type("application/x-www-form-urlencoded"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/check/:format")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/x-www-form-urlencoded'
request.body = "api_key=&api_secret=&code=&ip_address=&request_id="

response = http.request(request)
puts response.read_body
require 'faraday'

data = {
  :api_key => "",
  :api_secret => "",
  :code => "",
  :ip_address => "",
  :request_id => "",
}

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/x-www-form-urlencoded'}
)

response = conn.post('/baseUrl/check/:format') do |req|
  req.body = URI.encode_www_form(data)
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/check/:format";

    let payload = json!({
        "api_key": "",
        "api_secret": "",
        "code": "",
        "ip_address": "",
        "request_id": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/x-www-form-urlencoded".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .form(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/check/:format \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data api_key= \
  --data api_secret= \
  --data code= \
  --data ip_address= \
  --data request_id=
http --form POST {{baseUrl}}/check/:format \
  content-type:application/x-www-form-urlencoded \
  api_key='' \
  api_secret='' \
  code='' \
  ip_address='' \
  request_id=''
wget --quiet \
  --method POST \
  --header 'content-type: application/x-www-form-urlencoded' \
  --body-data 'api_key=&api_secret=&code=&ip_address=&request_id=' \
  --output-document \
  - {{baseUrl}}/check/:format
import Foundation

let headers = ["content-type": "application/x-www-form-urlencoded"]

let postData = NSMutableData(data: "api_key=".data(using: String.Encoding.utf8)!)
postData.append("&api_secret=".data(using: String.Encoding.utf8)!)
postData.append("&code=".data(using: String.Encoding.utf8)!)
postData.append("&ip_address=".data(using: String.Encoding.utf8)!)
postData.append("&request_id=".data(using: String.Encoding.utf8)!)

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/check/:format")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "The code inserted does not match the expected value",
  "status": "16"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Internal Error",
  "status": "5"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Bad credentials",
  "status": "4"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Invalid value for param: request_id",
  "status": "3"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Missing api_key",
  "status": "2"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "currency": "EUR",
  "estimated_price_messages_sent": "0.03330000",
  "event_id": "0A00000012345678",
  "price": "0.10000000",
  "request_id": "abcdef0123456789abcdef0123456789",
  "status": "0"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Throttled",
  "status": "1"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "The wrong code was provided too many times. Request terminated",
  "status": "17"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "The Vonage platform was unable to process this message for the following reason: Request 'abcdef0123456789abcdef0123456789' was not found or it has been verified already.",
  "status": "6"
}
POST Verify Control
{{baseUrl}}/control/:format
QUERY PARAMS

format
BODY formUrlEncoded

api_key
api_secret
cmd
request_id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/control/:format");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/x-www-form-urlencoded");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "api_key=&api_secret=&cmd=&request_id=");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/control/:format" {:form-params {:api_key ""
                                                                          :api_secret ""
                                                                          :cmd ""
                                                                          :request_id ""}})
require "http/client"

url = "{{baseUrl}}/control/:format"
headers = HTTP::Headers{
  "content-type" => "application/x-www-form-urlencoded"
}
reqBody = "api_key=&api_secret=&cmd=&request_id="

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/control/:format"),
    Content = new FormUrlEncodedContent(new Dictionary
    {
        { "api_key", "" },
        { "api_secret", "" },
        { "cmd", "" },
        { "request_id", "" },
    }),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/control/:format");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddParameter("application/x-www-form-urlencoded", "api_key=&api_secret=&cmd=&request_id=", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/control/:format"

	payload := strings.NewReader("api_key=&api_secret=&cmd=&request_id=")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/x-www-form-urlencoded")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/control/:format HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: example.com
Content-Length: 37

api_key=&api_secret=&cmd=&request_id=
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/control/:format")
  .setHeader("content-type", "application/x-www-form-urlencoded")
  .setBody("api_key=&api_secret=&cmd=&request_id=")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/control/:format"))
    .header("content-type", "application/x-www-form-urlencoded")
    .method("POST", HttpRequest.BodyPublishers.ofString("api_key=&api_secret=&cmd=&request_id="))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "api_key=&api_secret=&cmd=&request_id=");
Request request = new Request.Builder()
  .url("{{baseUrl}}/control/:format")
  .post(body)
  .addHeader("content-type", "application/x-www-form-urlencoded")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/control/:format")
  .header("content-type", "application/x-www-form-urlencoded")
  .body("api_key=&api_secret=&cmd=&request_id=")
  .asString();
const data = 'api_key=&api_secret=&cmd=&request_id=';

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/control/:format');
xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');

xhr.send(data);
import axios from 'axios';

const encodedParams = new URLSearchParams();
encodedParams.set('api_key', '');
encodedParams.set('api_secret', '');
encodedParams.set('cmd', '');
encodedParams.set('request_id', '');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/control/:format',
  headers: {'content-type': 'application/x-www-form-urlencoded'},
  data: encodedParams,
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/control/:format';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/x-www-form-urlencoded'},
  body: new URLSearchParams({api_key: '', api_secret: '', cmd: '', request_id: ''})
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/control/:format',
  method: 'POST',
  headers: {
    'content-type': 'application/x-www-form-urlencoded'
  },
  data: {
    api_key: '',
    api_secret: '',
    cmd: '',
    request_id: ''
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/x-www-form-urlencoded")
val body = RequestBody.create(mediaType, "api_key=&api_secret=&cmd=&request_id=")
val request = Request.Builder()
  .url("{{baseUrl}}/control/:format")
  .post(body)
  .addHeader("content-type", "application/x-www-form-urlencoded")
  .build()

val response = client.newCall(request).execute()
const qs = require('querystring');
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/control/:format',
  headers: {
    'content-type': 'application/x-www-form-urlencoded'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(qs.stringify({api_key: '', api_secret: '', cmd: '', request_id: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/control/:format',
  headers: {'content-type': 'application/x-www-form-urlencoded'},
  form: {api_key: '', api_secret: '', cmd: '', request_id: ''}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/control/:format');

req.headers({
  'content-type': 'application/x-www-form-urlencoded'
});

req.form({
  api_key: '',
  api_secret: '',
  cmd: '',
  request_id: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;
const { URLSearchParams } = require('url');

const encodedParams = new URLSearchParams();
encodedParams.set('api_key', '');
encodedParams.set('api_secret', '');
encodedParams.set('cmd', '');
encodedParams.set('request_id', '');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/control/:format',
  headers: {'content-type': 'application/x-www-form-urlencoded'},
  data: encodedParams,
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const { URLSearchParams } = require('url');
const fetch = require('node-fetch');

const encodedParams = new URLSearchParams();
encodedParams.set('api_key', '');
encodedParams.set('api_secret', '');
encodedParams.set('cmd', '');
encodedParams.set('request_id', '');

const url = '{{baseUrl}}/control/:format';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/x-www-form-urlencoded'},
  body: encodedParams
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/x-www-form-urlencoded" };

NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"api_key=" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"&api_secret=" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"&cmd=" dataUsingEncoding:NSUTF8StringEncoding]];
[postData appendData:[@"&request_id=" dataUsingEncoding:NSUTF8StringEncoding]];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/control/:format"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/control/:format" in
let headers = Header.add (Header.init ()) "content-type" "application/x-www-form-urlencoded" in
let body = Cohttp_lwt_body.of_string "api_key=&api_secret=&cmd=&request_id=" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/control/:format",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "api_key=&api_secret=&cmd=&request_id=",
  CURLOPT_HTTPHEADER => [
    "content-type: application/x-www-form-urlencoded"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/control/:format', [
  'form_params' => [
    'api_key' => '',
    'api_secret' => '',
    'cmd' => '',
    'request_id' => ''
  ],
  'headers' => [
    'content-type' => 'application/x-www-form-urlencoded',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/control/:format');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/x-www-form-urlencoded'
]);

$request->setContentType('application/x-www-form-urlencoded');
$request->setPostFields([
  'api_key' => '',
  'api_secret' => '',
  'cmd' => '',
  'request_id' => ''
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(new http\QueryString([
  'api_key' => '',
  'api_secret' => '',
  'cmd' => '',
  'request_id' => ''
]));

$request->setRequestUrl('{{baseUrl}}/control/:format');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/x-www-form-urlencoded'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/x-www-form-urlencoded")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/control/:format' -Method POST -Headers $headers -ContentType 'application/x-www-form-urlencoded' -Body 'api_key=&api_secret=&cmd=&request_id='
$headers=@{}
$headers.Add("content-type", "application/x-www-form-urlencoded")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/control/:format' -Method POST -Headers $headers -ContentType 'application/x-www-form-urlencoded' -Body 'api_key=&api_secret=&cmd=&request_id='
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "api_key=&api_secret=&cmd=&request_id="

headers = { 'content-type': "application/x-www-form-urlencoded" }

conn.request("POST", "/baseUrl/control/:format", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/control/:format"

payload = {
    "api_key": "",
    "api_secret": "",
    "cmd": "",
    "request_id": ""
}
headers = {"content-type": "application/x-www-form-urlencoded"}

response = requests.post(url, data=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/control/:format"

payload <- "api_key=&api_secret=&cmd=&request_id="

encode <- "form"

response <- VERB("POST", url, body = payload, content_type("application/x-www-form-urlencoded"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/control/:format")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/x-www-form-urlencoded'
request.body = "api_key=&api_secret=&cmd=&request_id="

response = http.request(request)
puts response.read_body
require 'faraday'

data = {
  :api_key => "",
  :api_secret => "",
  :cmd => "",
  :request_id => "",
}

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/x-www-form-urlencoded'}
)

response = conn.post('/baseUrl/control/:format') do |req|
  req.body = URI.encode_www_form(data)
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/control/:format";

    let payload = json!({
        "api_key": "",
        "api_secret": "",
        "cmd": "",
        "request_id": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/x-www-form-urlencoded".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .form(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/control/:format \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data api_key= \
  --data api_secret= \
  --data cmd= \
  --data request_id=
http --form POST {{baseUrl}}/control/:format \
  content-type:application/x-www-form-urlencoded \
  api_key='' \
  api_secret='' \
  cmd='' \
  request_id=''
wget --quiet \
  --method POST \
  --header 'content-type: application/x-www-form-urlencoded' \
  --body-data 'api_key=&api_secret=&cmd=&request_id=' \
  --output-document \
  - {{baseUrl}}/control/:format
import Foundation

let headers = ["content-type": "application/x-www-form-urlencoded"]

let postData = NSMutableData(data: "api_key=".data(using: String.Encoding.utf8)!)
postData.append("&api_secret=".data(using: String.Encoding.utf8)!)
postData.append("&cmd=".data(using: String.Encoding.utf8)!)
postData.append("&request_id=".data(using: String.Encoding.utf8)!)

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/control/:format")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Verification request ['abcdef0123456789abcdef0123456789'] can't be cancelled within the first 30 seconds.",
  "status": "19"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Verification request  ['abcdef0123456789abcdef0123456789'] can't be cancelled now. Too many attempts to re-deliver have already been made.",
  "status": "19"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Internal Error",
  "status": "5"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Bad credentials",
  "status": "4"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Invalid value for param: request_id",
  "status": "3"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Missing api_key",
  "status": "2"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "command": "cancel",
  "status": "0"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "command": "trigger_next_event",
  "status": "0"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Throttled",
  "status": "1"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "No more events are left to execute for the request ['abcdef0123456789abcdef0123456789']",
  "status": "19"
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/search/:format?api_key=&api_secret=&request_id=");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/search/:format" {:query-params {:api_key ""
                                                                         :api_secret ""
                                                                         :request_id ""}})
require "http/client"

url = "{{baseUrl}}/search/:format?api_key=&api_secret=&request_id="

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/search/:format?api_key=&api_secret=&request_id="),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/search/:format?api_key=&api_secret=&request_id=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/search/:format?api_key=&api_secret=&request_id="

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/search/:format?api_key=&api_secret=&request_id= HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/search/:format?api_key=&api_secret=&request_id=")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/search/:format?api_key=&api_secret=&request_id="))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/search/:format?api_key=&api_secret=&request_id=")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/search/:format?api_key=&api_secret=&request_id=")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/search/:format?api_key=&api_secret=&request_id=');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/search/:format',
  params: {api_key: '', api_secret: '', request_id: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/search/:format?api_key=&api_secret=&request_id=';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/search/:format?api_key=&api_secret=&request_id=',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/search/:format?api_key=&api_secret=&request_id=")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/search/:format?api_key=&api_secret=&request_id=',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/search/:format',
  qs: {api_key: '', api_secret: '', request_id: ''}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/search/:format');

req.query({
  api_key: '',
  api_secret: '',
  request_id: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/search/:format',
  params: {api_key: '', api_secret: '', request_id: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/search/:format?api_key=&api_secret=&request_id=';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/search/:format?api_key=&api_secret=&request_id="]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/search/:format?api_key=&api_secret=&request_id=" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/search/:format?api_key=&api_secret=&request_id=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/search/:format?api_key=&api_secret=&request_id=');

echo $response->getBody();
setUrl('{{baseUrl}}/search/:format');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData([
  'api_key' => '',
  'api_secret' => '',
  'request_id' => ''
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/search/:format');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
  'api_key' => '',
  'api_secret' => '',
  'request_id' => ''
]));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/search/:format?api_key=&api_secret=&request_id=' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/search/:format?api_key=&api_secret=&request_id=' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/search/:format?api_key=&api_secret=&request_id=")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/search/:format"

querystring = {"api_key":"","api_secret":"","request_id":""}

response = requests.get(url, params=querystring)

print(response.json())
library(httr)

url <- "{{baseUrl}}/search/:format"

queryString <- list(
  api_key = "",
  api_secret = "",
  request_id = ""
)

response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/search/:format?api_key=&api_secret=&request_id=")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/search/:format') do |req|
  req.params['api_key'] = ''
  req.params['api_secret'] = ''
  req.params['request_id'] = ''
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/search/:format";

    let querystring = [
        ("api_key", ""),
        ("api_secret", ""),
        ("request_id", ""),
    ];

    let client = reqwest::Client::new();
    let response = client.get(url)
        .query(&querystring)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url '{{baseUrl}}/search/:format?api_key=&api_secret=&request_id='
http GET '{{baseUrl}}/search/:format?api_key=&api_secret=&request_id='
wget --quiet \
  --method GET \
  --output-document \
  - '{{baseUrl}}/search/:format?api_key=&api_secret=&request_id='
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/search/:format?api_key=&api_secret=&request_id=")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Internal Error",
  "status": "5"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Bad credentials",
  "status": "4"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Invalid value for param: request_id",
  "status": "3"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Missing api_key",
  "status": "2"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "No response found",
  "status": "101"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "account_id": "abcdef01",
  "checks": [
    {
      "code": "1111",
      "date_received": "2020-01-01 12:00:00",
      "ip_address": "",
      "status": "INVALID"
    },
    {
      "code": "1234",
      "date_received": "2020-01-01 12:02:00",
      "ip_address": "",
      "status": "VALID"
    }
  ],
  "currency": "EUR",
  "date_finalized": "2020-01-01 12:00:00",
  "date_submitted": "2020-01-01 12:00:00",
  "estimated_price_messages_sent": "0.06660000",
  "events": [
    {
      "id": "0A00000012345678",
      "type": "sms"
    },
    {
      "id": "0A00000012345679",
      "type": "sms"
    }
  ],
  "first_event_date": "2020-01-01 12:00:00",
  "last_event_date": "2020-01-01 12:00:00",
  "number": "447700900000",
  "price": "0.1000000",
  "request_id": "abcdef0123456789abcdef0123456789",
  "sender_id": "verify",
  "status": "SUCCESS"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error_text": "Throttled",
  "status": "1"
}