Authentication

All requests to the DataVet API require a JSON web token to be set in the header. To receive a token, you submit your account credentials to the route below. To request an account please see our help page.

Request

When creating an account you will set an email, password and application name.

    POST /authenticate/third_party
    
{
   "email": "example@example.com",
   "password": "superSecret",
   "name": "My App"
}
    

Response

The API will return a JSON object with a token key containing your token: {"token": "token here"}

Using the web token

On each API request, the access token must be presented in an HTTP header with the following format:

Authorization: Bearer TOKEN

Expiration

Each token lasts 2 weeks, this is subject to change so shouldn't be used as a method to test your tokens validitiy.

An expired token will result in the application returning a 401 - Unauthorized, if this is the case you should renew your token and try again.