Authentication
The Payroc API uses Bearer tokens to authenticate requests. To generate a Bearer token, include your API token in the ‘x-api-key’ parameter in the header of a request to the Payroc Identity Service.
Important: Use HTTPS for all requests to the Payroc API. We reject all HTTP requests, and all requests that are not properly authenticated.
Request
Identity Service endpoints:
Response
Request headers
Include the following headers in each request to the Payroc API:
- Content-Type: Include
application/json. - Authorization: Include your Bearer token.
- Idempotency-Key: Include a UUID v4 to make POST and PATCH requests idempotent.
Note: Some endpoints require a different value for Content-Type. Check the individual guide for exceptions.
API key best practices
- Grant API keys with the least amount of privilege to carry out target tasks.
- Do not share API keys.
- Do not use API keys in publicly accessible areas, for example, client-side code.