Integrating with Bud.Customer.Api.Link APIs

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

To gain access to Bud's APIs a client is required which is can then be used to Authenticate with the Bud platform and for use with Bud's APIs. Please contact you account manager at Bud for client credentials. Further information can be found on Bud's knowledge base: https://support.bud.co.uk/hc/en-gb/articles/360015087537-Integrating-with-Buds-3rd-Party-APIs.

Authentication

Once granted you will be provided a Client Id and a Client Secret which can then be provided to our authentication server: https://auth.bud.co.uk/connect/token.

The authentication flow is as follows:

  1. A request is for an access token is sent to Bud's 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. Bud authenticates and if successful returns HTTP OK 200 with a JWT Bearer Token within the payload
  3. This token can then be forwarded on for future API requests
  4. Each call the token 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 our API's there will be a button labeled '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 add a new header named 'Authorization' with the value starting with 'Bearer ' and finishing with the relevant jwt token generated from the Authentication section. Once done and all required parameters are entered, you should be able to successfully send the request.