Skip to main content
Peerlogic API requests use Bearer access tokens. Request a token with your Peerlogic credentials, then include that token in the Authorization header on subsequent requests.

Authentication flow

  1. Request an access token from the token endpoint using your Peerlogic username and password.
  2. Copy the access_token value from the response.
  3. Include the token in the Authorization header for every secured API request.
  4. Request a new token when the current token expires or the API returns 401 Unauthorized.
Access to individual resources is determined by the permissions assigned to your Peerlogic account. A valid token can still receive 403 Forbidden when the account does not have access to the requested resource.

Request a token

Send a form-encoded POST request to:
The request accepts the following values:
string
required
Your Peerlogic username, usually your email address.
string
required
The password associated with your Peerlogic account.
string
default:"password"
Use password.
string
default:"json"
Use json.

Token response

A successful response includes an access token, refresh token, expiration period, token type, and granted scope.

Authorize a request

Add the access token to the Authorization header. The word Bearer must precede the token, separated by a space:
When using Try it in this API reference, enter the access token in the Authorization field. Mintlify adds the Bearer authentication header to the request.

Authentication errors

Treat credentials, access tokens, and refresh tokens as secrets. Do not place them in browser code, logs, or source control.

Next step

Use your token to make your first API request. To determine which customer resources your account can use, see Organization and practice access.