Authentication

Tell us who you are

To ensure no spooky stuff happens.

Exchange credentials for token. (Example only)

post

You will be provided with a client_id and a client_secret which you'll use to authenticate yourself in the system. The first thing you need to do is to get access token which you will then use for further requests. When it expires, you will need to request another one. Multiple tokens can be active at once.

Supported types:

  • client_credentials Once you have a valid access token, you will need to use it to sign all requests made to the Prio API.

This is done by providing Authorization HTTP header along with each of your requests in the following format:

  • Authorization: <token_type> <access_token>

If this header is not present in the request, the service will reject the request by returning the HTTP error code 400 and respond with an appropriate error message.

Please do not manually perform this operation, we highly encourage you to use an existing OAuth library for your specific language.

Make sure to call this endpoint only in case your current token has expired to reduce roundtrips and overal latency.

Authorizations
Header parameters
AuthorizationstringOptional

The client sends HTTP requests with the Authorization header that contains the word Basic word followed by a space and a base64-encoded string username:password.

Body
grant_typestringRequired

Value MUST be set to "client_credentials".

Example: client_credentials
scopestringOptional

The scope of the access request.

Example: https://www.prioticketapis.com/auth/distributor.booking
Responses
200

Successfully Authenticated

application/json
post
POST /v3.8/distributor/oauth2/token HTTP/1.1
Host: staging-distributor-api.prioticket.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 101

{
  "grant_type": "client_credentials",
  "scope": "https://www.prioticketapis.com/auth/distributor.booking"
}
{
  "access_token": "eyJhbGciOiJIUzI1NiJ9.e30.XmNK3GpH3Ys_7wsYBfq4C3M6goz71I7dTgUkuIa5lyQ",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "https://www.prioticketapis.com/auth/distributor.booking"
}

Was this helpful?