Authenticating to the Recras API

Most of the Recras API endpoints are limited to authenticated requests. A very limited number is publicly accessible, usually with limited funcationality and information.

API Keys

Authenticating to the Recras APIs is preferably done with API Keys, which can be created in the Recras interface. Present your API key in an Authorization: Bearer header, as specified in RFC 6750.

Example request:

GET /api2/personeel/me HTTP/1.1
Host: demo.recras.nl
Authorization: Bearer asdfhjklaoed

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
   "fields": "values"
}

Username:password

Alternatively, API requests can be authenticated with HTTP Basic Authentication(https://en.wikipedia.org/wiki/Basic_access_authentication), but this method should be considered deprecated since July 2020.

Example request:

GET /api2/personeel/me HTTP/1.1
Host: demo.recras.nl
Authorization: Basic YmVoZWVyOmRlbW8=

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
   "fields": "values"
}