Authorization

We require that a JSON Web Token JWT be sent along with your request via the Authorization header. There’s no need to create JWTs manually, they will be created for you when you register for the API - Register Here!

JWTs are passed as bearer tokens in the Authorization header, and look like the following:

Authorization: <Enter your API Key>

To specify the Headers, use this code:

Shell

With shell, you can just pass the correct header with each request:

curl "<endpoint-url>" \
-H "Authorization: <api-key>"
-H "Accept: application/vnd.api+json"

Java

import java.io.*;
import java.net.*;

URL url = new URL("<endpoint-url>");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
conn.setRequestProperty("Authorization","<api-key>");
conn.setRequestProperty("Accept", "application/vnd.api+json");

conn.getInputStream()

Python

import requests

url = "<endpoint-url>"

header = {
  "Authorization": "<api-key>",
  "Accept": "application/vnd.api+json"
}

r = requests.get(url, headers=header)

Go

import "net/http"

client := &http.Client{}
req, _ := http.NewRequest("GET","<endpoint-url>",nil)
req.Header.Set("Authorization", "<api-key>")
req.Header.Set("Accept", "application/vnd.api+json")
res, _ := client.Do(req)