I've got an API key. What happens now?

Accessing our API is easy, free and available to all.

Once you start using it, you will like it so much that you may hit our rate limit. If that happens, do not despair. Email us and ask for an API key. It will consist of an <app_name> and a <secret> combination.

So you've got the key, what happens now?

  • Request a token with your credentials using the method /public/auth/request_token
import requests  

jwt = requests.get(API + 'public/auth/request_token',  

  • Check the token is valid:
is_valid = requests.get(API +'public/auth/validate_token',  
                        headers={'Auth-Token': jwt.json()['token']})
  • Read the token served in the response and pass it into any other following request as an Auth-Token header
import requests  
from pprint import pprint

def get_token(app_name,secret):  
    jwt = requests.get(API + 'public/auth/request_token',
    return jwt.json()['token']

token =    get_token(<appname>,<secret>)

response = requests.get(API + 'association/filter',  
                        headers={'Auth-Token': token})

  • When your token expires, you will get a 419 error. If it happens, please request another token.
if response.status_code == 419:  
    # get a new token and try again
    token = get_token()
    r =    requests.get( ...
    # go ahead
    dosomething(response.json()['data'] ...

Keep in mind that getting a new token for each request is not recommended. This will impact your usage limit and slow down all other calls.

Other than that, go look at our API, request the key if necessary and share the news.