Developer Hub

» EventBookings API Authentication

EventBookings API Authentication

Introduction

Welcome to the EventBookings API Authentication page. To interact with the EventBookings API, all requests must be authenticated using a Bearer Token. This process involves requesting an access token, which is used to authorise each API call.

Application

Before proceeding with authentication, you must create an application. Follow the Application Creation Procedure 

  1. Set up your application.
  2. Configure the required parameters.
  3. Obtain the necessary credentials (client_id and client_secret) for seamless API integration.

Obtaining Access Token

To interact with the API, all requests must be authenticated using bearer token. The steps below guide you through obtaining and using an access token.

Step 1: Obtain an Access Token

To authenticate, you'll need to obtain an access token by making a request using Bearer Token. This access token will be included in the headers of all subsequent API requests.

Authentication Endpoint

  • URL: https://identity.eventbookings.com/connect/token
  • Method: POST
  • Content-Type: application/json

Request Body

In your request, you must send the following parameters:

{
  "grant_type": "client_credentials",
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET"
}
  • grant_type: Set this to "client_credentials". This specifies the Bearer Token to obtain an access token for API access.
  • client_id: Your application's client ID, provided during application registration.
  • client_secret: Your application's client secret, also provided during application registration.

Response

Upon a successful request, you will receive a response containing the access token and refresh token.

Example Response

{
  "access_token": "abcd1234exampleaccesstoken",
  "refresh_token": "abcd5678examplerefreshtoken",
  "expires_in": 3600
}
  • access_token: The token to include in the Authorisation header of all API requests.
  • refresh_token: Token to use for obtaining a new access token without re-authenticating.
  • expires_in: The duration (in seconds) before the access token expires (typically 3600 seconds or 1 hour).

Step 2: Use the Access Token

Once you have obtained the access token, include it in the Authorisation header of every API request. Here’s an example of how to do this:

Example Header

Authorisation: Bearer abcd1234exampleaccesstoken

Summary

  1. Send a POST request to the /connect/token endpoint with your client_id and client_secret.
  2. Extract the access_token from the response.
  3. Include the access_token in the Authorisation header of every API request to authenticate.

This process ensures all API calls are securely authenticated.