Authentication

Tokens are passed using an authentication header and are used to authenticate a user account with the API.

You can either obtain a single user specific token or follow the OAuth flow described below.

In the majority of cases, we advise to use a single user token for authentication.

Please note that API access is available on selected plans only. If you are new to DISCO, email us at [email protected].

Single user bearer token

Best used if you are building an integration between your platform and a DISCO that you have access to.

  1. Get in touch with your DISCO Customer Success Manager.
  2. Specify which of your admin users you want to obtain a token for. We don't have service account tokens. If you don't want the token to be associated to a specific user, you may want to create a generic admin user in your DISCO instead. Ask our team for advise if you are unsure.
  3. We will share the token with you securely.

OAuth flow

Best used if you are building an integration for a third party that needs to log into their own DISCO to do something with your integration.

  1. Get in touch with your DISCO Customer Success Manager.
  2. Tell us your preferred redirect URL. We will give your client ID and client secret in return.
  3. Establish the OAuth flow. It should begin here: https://your-business-hostname.disco.ac/oauth/authorize/?client_id=YOUR_CLIENT_ID&response_type=code
  4. User logs in to DISCO.
  5. Once a user has landed on the https://your-business-hostname.disco.ac/oauth/authorize/ page, they will be asked to confirm authorization for external application’s access to their DISCO. They will be redirected to the redirect URL provided to us in step 2.
  6. Send a POST request to https://your-business-hostname.disco.ac/oauth/token/ with following parameters:
ParameterDescription
grant_typeauthorization_code
codereturned in step 5
client_idprovided in step 2
client_secretprovided in step 2
redirect_uridefined in step 2
https://{HOSTNAME}.disco.ac/oauth/token/?code={CODE}&grant_type=authorization_code&client_id={CLIENT_ID}&client_secret={CLIENT_SECRET}&redirect_uri={REDIRECT}
  1. Client application receives access token.
  2. Requests to external API can now be sent with the Bearer token in the authorization header, as detailed in the rest of this guide.