Integrating via the Bud API Suite

Bud provides REST APIs for managing resources within the Bud platform which are secured by OAuth using token-based authentication.

To gain access to Bud's API Suite an API Client and API Subscrition Key is required. Once aquired the API Client credentials can be used to Authenticate with the Bud platform and along with the Subscription Key access to the Bud API Suite is granted.

Please contact you account manager at Bud for client credentials and subscription key.

Authentication

You will first need to aquire a JWT Bearer token which can be aquired by providing your API Client Id and a API Client Secret to the Bud authentication server: https://auth.bud.co.uk/connect/token.

The authentication flow is as follows:

  1. A request for an access token is sent to the Bud authentication server:

    POST /connect/token HTTP/1.1
    Host: https://auth.bud.co.uk/connect/token
    Content-Type: application/x-www-form-urlencoded
    client_id=CLIENT ID&client_secret=CLIENT SECRET&grant_type=client_credentials

  2. The Bud authentication server then authenticates the request and if successful returns HTTP OK 200 with a JWT Bearer Token within the payload
  3. This token must then be provided in the headers on future requests to the Bud API Suite endpoints along with your API Subscription Key.

    Authorization: Bearer JWT TOKEN
    Bud-Api-Subscription-Key: API SUBSCRIPTION KEY

  4. Each call the JWT token and subscription key is checked for authenticity, validilty and authorised.
  5. A 401 can be returned when the token expires
  6. A 403 can be returned when authorisation is not granted for a particular endpiont

Testing using the Developer Portal console

When exploring the Bud API Suite you can test using the 'Try this operation' available under each endpoint. This will open a side panel that will allow you do to things such as:

To correctly Authorize the request, you must provide your JWT token and API Subscription Key by adding the the 'Authorization' and 'Bud-Api-Subscription-Key' headers

Once done and all required parameters are entered, you should be able to successfully send the request.

Further information about integration can be found on Bud's knowledge base: Integrrating with Buds 3rd Party APIs.