Authentication

Privasfer.com authentication is based on Bearer authentication (also called token authentication).

 

Get your API token #

Once you are logged to privasfer.com app dashboard, navigate to your profile API settings page and create your API token.

You can set name to your token, so you can know where this one is going to be used. Specific token name, let you manage API tokens much easier.

Once you create a token, it'll be shown only once, so make sure to store it safely. API tokens are never shown again for security reasons, tokens can be revoked so you could generate a new one.

Once you have your token, you can authenticate against privasfer.com application API.

 

Authenticate against the API #

The token you reviewed in previous step, can be used as Bearer authentication header.

There is a small CURL based example of how you can authenticate and get list of files against API.

curl https://privasfer.com/api/files \
    -H 'Authorization: Bearer 7xcB5XlinBWGzajPdSW7bHr12erWZICIJN4jk0RpasoLYLpoiD6ErYnVSzld' \
    -H 'Accept: application/json' \
    -H 'Content-Type: application/json'

In this example you can see how 7xcB5XlinBWGzajPdSW7bHr12erWZICIJN4jk0RpasoLYLpoiD6ErYnVSzld token has been used to authenticate and get list of files from /api/files endpoint. More about listing files against API you can read here.