Links API DocsLinks API Docs

Authentication

LINKs API offers two forms of authentication depending on the request type:

Keep your keys safe#

It is important to avoid sharing your credential in public places like Github or Bitbucket since it can allow malicious API calls.

Basic Authentication

Basic Authentication requires a header with encoded credentials. Use your ID and secret joined by a colon (:) and encoded in Base64 format. The code below exemplifies how to encode it:

echo -n '<ID>:<secret>' | base64

After encoding it, use the encoded string it results in the authorization header of your requests, like presented below:

curl --request <Method> \
    --url <URL> \
    --header 'accept: application/json' \
    --header 'content-type: application/json' \
    --header 'authorization: Basic <ENCODED_STRING>'

Client Token Authentication

Client tokens are one-time-use passwords generated server-side using Basic Authentication. The token is then used in requests as:

curl --request <Method> \
    --url <URL> \
    --header 'accept: application/json' \
    --header 'content-type: application/json' \
    --header 'authorization: X-Api-Key <client_token>'