Basic Authentication
To authenticate a request using Basic Authentication, pass the Base64-encoded login credentials of a registered user in theAuthorization header of the request. Follow this guidance when passing the credentials:
- The username is the email address of the user, e.g.
user@cdata.com. - The password is a Personal Access Token (PAT) that you generate from the Settings page.
- If your application or service does not automatically Base64-encode the string, follow these steps to encode it manually:
- Separate the username and PAT with a colon, for example,
user@cdata.com:token. - Use Base64 to encode the colon-separated string.
- Separate the username and PAT with a colon, for example,
OAuth 2.0 Client Credentials
Service accounts authenticate via the OAuth 2.0 Client Credentials flow. Use this method to authenticate scripts, jobs, and external services without a human user. You must first create a service account and copy its Client Id and Client Secret from the Users page. Step 1: Request a bearer tokenaccess_token value.
Step 2: Call the Connect AI API
Pass the token as a Bearer credential in subsequent requests. For example, to run a query: