set_api_auth
Configure API authentication methods including API keys and bearer tokens, with secure credential handling through environment variables.
Instructions
Configure authentication for an API. Supports API key (header or query param) and bearer token auth. Use env_var to reference a secret from an environment variable — the credential is then resolved at request time and never stored on disk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_id | Yes | The API identifier | |
| auth_type | Yes | Type of authentication | |
| credential | No | The API key or bearer token. Not required when env_var is set. | |
| env_var | No | Environment variable name that holds the credential (e.g., 'GITHUB_TOKEN'). When set, the secret is read from this env var at request time and never written to disk. | |
| header_name | No | Header name for API key (default: X-API-Key) | |
| param_name | No | Query param name for API key auth |