Skip to main content

Authorisations

Authorisations are used to authenticate API requests made by the agent. This is an optional setting and is only required if the API requires authentication. TootheFairyAI supports the following authorisation types:

  • API Key: This is a simple key that is passed as a query parameter in the URL.
  • Bearer Token: This is a token that is passed in the header of the request.
  • OAuth2: This is a more complex authorisation type that requires a client ID, client secret, and other parameters.

Authorisations can be created and or edited from the following menu: Settings > Authorisations > Create

Create an authorisation

  1. Click on the Create button.
  2. Fill in the authorisation name and description(optional).
  3. Select the Authorisation type from the dropdown menu (API Key, Bearer Token, OAuth2).
  4. Fill in the required fields based on the authorisation type selected.

API Key

For an API Key, you will need to provide the following details:

  • Key: The key that is passed as a query parameter in the URL.

Bearer Token

For a Bearer Token, you will need to provide the following details:

  • Token: The token that is passed in the header of the request.

OAuth2

For OAuth2, you will need to provide the following details:

  • Client ID: The client ID provided by the API.
  • Client Secret: The client secret provided by the API
  • Token URL: The URL to get the token.
  • Scope: The scope of the token(optional).
  • Grant Type: The grant type of the token.
  • Static arguments: This optional setting is available to allow for a static set of parameters to be passed with the unauthorised initial request.
Note

All the secret fields are encrypted and stored securely. You will not be able to see the secret fields once you save the authorisation. In case you forget the secret fields, you will need to create a new authorisation.