Documentation Index
Fetch the complete documentation index at: https://docs.knoxcall.com/llms.txt
Use this file to discover all available pages before exploring further.
Create OAuth2 Secret
redirect_uri returned in the response. For non-interactive grant types (client_credentials, password), tokens are fetched immediately without any redirect.
Supported providers: google, github, salesforce, microsoft, slack, custom
For custom providers, you must supply auth_url and token_url.
OAuth2 secrets require a Pro or Enterprise plan.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Secret name (spaces → underscores) |
provider | string | Yes | OAuth2 provider: google, github, salesforce, microsoft, slack, or custom |
client_id | string | Yes | OAuth2 client ID from your provider’s developer console |
client_secret | string | Conditional | OAuth2 client secret. Required unless using mtls_certificate_id or grant_type: implicit |
grant_type | string | No | authorization_code (default), client_credentials, password, or implicit |
scopes | string[] | No | OAuth2 scopes to request. Defaults to the provider’s recommended scopes |
auth_url | string | No | Authorization endpoint URL. Required for custom provider |
token_url | string | No | Token endpoint URL. Required for custom provider |
username | string | Conditional | Username for password grant type |
password | string | Conditional | Password for password grant type |
mtls_certificate_id | uuid | No | ID of a certificate-type secret for mTLS auth to the token endpoint |
collection_id | uuid | No | Assign to a collection |
Response
Register the returned
redirect_uri as an authorized redirect URL in your OAuth2 provider’s app settings before redirecting users through the authorization flow.POST /v1/secrets with secret_type: "oauth2" and the same body fields.
Errors
| Status | Type | Description |
|---|---|---|
| 400 | validation_error | Missing required fields, invalid provider, or mTLS certificate not found |
| 403 | plan_limit | OAuth2 secrets require Pro or Enterprise plan, or secret limit reached |
| 409 | conflict | A secret with this name already exists |