Authentication

 

To access the PdfBroker.io api you need to perform an authencation request by POST to https://accounts.pdfbroker.io/connect/token and receive your access token.

The authentication request uses the OAuth 2.0 protocol and the following parameters needs to be provided:

  • client_id - You find your client id in the members section /members/api
  • client_secret - You find your client secret in the members section /members/api
  • grant_type - This parameter should always be set to "client_credentials"

The Content-Type header of the request must be application/x-www-form-urlencoded and the body of the request should be formatted like this:

client_id=<your client id>&client_secret=<your client secret>&grant_type=client_credentials

On successful authentication you will receive a JSON response

{
    "access_token": "<use this value in Authorization header on api requests>",
    "expires_in": 3600,
    "token_type": "Bearer",
    "scope": "pdfbroker"
}
The provided access_token in the response should included as a Bearer token in the Authorization header of all requests to the PdfBroker.io api.
Authorization: Bearer <access_token here>