> ## Documentation Index
> Fetch the complete documentation index at: https://docs.auth-agent.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API Overview

> Complete Auth Agent API reference

## Base URL

```
https://api.auth-agent.com
```

## Authentication

Auth Agent uses OAuth 2.1 with PKCE (Proof Key for Code Exchange) for secure authorization. All API endpoints require proper authentication as described in their respective documentation.

## Endpoint Categories

> [card] [OAuth Endpoints](https://docs.auth-agent.com/api-reference/oauth/authorize.md)
>
> Standard OAuth 2.1 endpoints for authorization and token management

> [card] [Agent Back-Channel](https://docs.auth-agent.com/api-reference/agent/authenticate.md)
>
> Agent-to-server communication endpoints for authentication flow

> [card] [Discovery](https://docs.auth-agent.com/api-reference/discovery.md)
>
> OAuth server metadata and JWKS endpoints

## OAuth Endpoints

Public endpoints implementing the OAuth 2.1 standard:

> [card] [/authorize](https://docs.auth-agent.com/api-reference/oauth/authorize.md)
>
> **GET** - Start OAuth authorization flow

> [card] [/token](https://docs.auth-agent.com/api-reference/oauth/token.md)
>
> **POST** - Exchange authorization code or refresh token for access tokens

> [card] [/userinfo](https://docs.auth-agent.com/api-reference/oauth/userinfo.md)
>
> **GET** - Get user information (email only - no name or username)

> [card] [/introspect](https://docs.auth-agent.com/api-reference/oauth/introspect.md)
>
> **POST** - Validate and inspect tokens

> [card] [/revoke](https://docs.auth-agent.com/api-reference/oauth/revoke.md)
>
> **POST** - Revoke access or refresh tokens

## Agent Back-Channel Endpoints

Endpoints used by agents to authenticate via back-channel:

> [card] [/api/agent/authenticate](https://docs.auth-agent.com/api-reference/agent/authenticate.md)
>
> **POST** - Authenticate agent and create authorization code

> [card] [/api/check-status](https://docs.auth-agent.com/api-reference/agent/check-status.md)
>
> **GET** - Poll for authorization status

## Discovery Endpoints

OAuth server metadata and key information:

> [card] [/.well-known/oauth-authorization-server](https://docs.auth-agent.com/api-reference/discovery.md)
>
> **GET** - OAuth 2.0 server metadata

> [card] [/.well-known/jwks.json](https://docs.auth-agent.com/api-reference/discovery.md)
>
> **GET** - JSON Web Key Set

## Rate Limiting

Currently, Auth Agent does not implement rate limiting. This may change in future versions.

## Error Responses

All endpoints follow standard OAuth 2.0 error response format:

```json theme={null}
{
  "error": "invalid_request",
  "error_description": "Missing required parameter: client_id"
}
```

### Common Error Codes

| Code | Description |
| - | - |
| `invalid_request` | The request is missing a required parameter or is malformed |
| `invalid_client` | Client authentication failed |
| `invalid_grant` | The authorization code or refresh token is invalid or expired |
| `unauthorized_client` | The client is not authorized to use this grant type |
| `unsupported_grant_type` | The grant type is not supported |
| `invalid_scope` | The requested scope is invalid or unknown |
| `server_error` | Internal server error occurred |

## Security

> [accordion] PKCE Required
>
> All authorization flows must use PKCE (Proof Key for Code Exchange) with the S256 method. Plain code challenges are not supported.

> [accordion] HTTPS Required
>
> All redirect URIs must use HTTPS, except for localhost development. HTTP is only allowed for localhost URLs.

> [accordion] Token Rotation
>
> Refresh tokens are automatically rotated on each use. When you use a refresh token to get new access tokens, the old refresh token is revoked and a new one is issued.

> [accordion] Secure Secrets
>
> All secrets (agent secrets, client secrets) are hashed using bcrypt with 10 rounds before storage. Never share your secrets in client-side code.

## SDKs and Libraries

> [card] [Python](https://docs.auth-agent.com/guides/examples)
>
> ```bash theme={null}
> pip install auth-agent-tools
> ```

> [card] [JavaScript/TypeScript](https://docs.auth-agent.com/guides/examples)
>
> NPM package coming soon

## Need Help?

> [card] [Quickstart Guide](https://docs.auth-agent.com/quickstart.md)
>
> Get started in minutes

> [card] [Integration Scenarios](https://docs.auth-agent.com/guides/integration-scenarios.md)
>
> Choose the right integration pattern

> [card] [GitHub](https://github.com/auth-agent/auth-agent)
>
> View source code and contribute

> [card] [Report Issues](https://github.com/auth-agent/auth-agent/issues)
>
> Found a bug? Let us know


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.