Authentication to the PDF Insights API is done by passing credentials in the request header.
All API calls must contain Authorization and MT-Product headers. They may also contain an optional MT-Customer-ID header.
| Header | Description | Supported Values |
|---|---|---|
| Authorization required | The credentials for the requests |
|
| MT-Product required | The product you are accessing. | One of the following values:
|
| MT-Customer-ID optional | For resellers using a customer ID for authentication. | MT-Customer-ID: your_customer_id_here |
The Authentication header supports three types of credentials:
- Username/Password
- Session Token
- License Token
The username/password combination of any user registered in PDF Insights. These should be submitted in base64-encoded format via Basic authentication.
Authorization: Basic base64(username:password)Via the /authenticate endpoint, you can exchange username/password credentials for a session token. You can then submit this to any subsequent API call as a Bearer token.
Authorization: Bearer session_tokenNote: A session token expires after 24 hours.
deprecated
The license key for your account. It should be submitted as a Bearer token.
Authorization: Bearer license_keyTo obtain a session token, simply send a credentialed GET request to the /authenticate endpoint. Be sure to include the two required headers.
GET api/v1.5/authenticate
Authorization: Basic base64(username:password)
MT-Product: your_productNote: You also use your license code as an lasting token.
To migrate to header authentication, you will need to do three things:
- Replace calls to
POST /authenticate, with the newGET /authenticate. - Remove username, password, token, product, and customer-id properties from your request body.
- Replace them with
Authorization,MT-Product, and optionallyMT-Customer-IDheaders.