Authentication

Authenticate your API call.

On each API call set request headers to include your access key to authenticate.
sm_api_icon

Request Headers

Request Headers

ParameterValueRequired
AuthorizationYour unique access key.Yes
Code Examples

Code Examples

C#
using (WebClient client = new WebClient())
{
    client.Headers.Add("Authorization", "YOUR_ACCESS_KEY");
}
php
$url = 'https://rest.sendmode.com/v2/END_POINT';
$data = array(YOUR_DATA);

$options = array(
    'http' => array(
        'header'  => "Content-type: application/x-www-form-urlencoded\r\n" .
            "Authorization: YOUR_ACCESS_KEY\r\n",
        'method'  => 'POST',
        'content' => http_build_query($data)
    )
);
$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);
Java
HttpClient httpclient = HttpClients.createDefault();
HttpPost httppost = new HttpPost("https://rest.sendmode.com/v2/END_POINT");
httppost.setHeader(HttpHeaders.AUTHORIZATION, YOUR_ACCESS_KEY);