Skip to content

API Authentication Overview

eGain REST APIs use the OAuth 2.0 authorization framework to ensure secure access. Before making API requests, you must obtain an access token to prove your application has the necessary permissions.

The authentication process consists of four high-level steps:

  1. Register a Client Application: Log in to the eGain Administration Console to create a client application. This generates your Client ID and Client Secret.
  2. Find your API Metadata: Access the Metadata button on your application page to find the specific Authorization and Token URLs for your instance.
  3. Obtain a Token: Choose an Authentication Flow based on your integration type:
  4. Call the API: Include the token in the HTTP Authorization header as a Bearer token.

Quick Reference: Authentication Details

After completing all the steps, you can call APIs by including the generated access token in a Bearer token as authentication.

RequirementDescription
ProtocolOAuth 2.0
HeaderAuthorization: Bearer <access_token>
Token Domainhttps://ai.egain.cloud/
API Domainhttps://api.ai.egain.cloud/