auth.md

# mpboard.ai — Agent Authentication Guide

## Getting Access

mpboard.ai provides both public and authenticated API access for AI agents.

### Public Access (No Auth Required)
- Content search: `GET /wp-json/wp/v2/search`
- Course catalog: `GET /wp-json/ldlms/v1/courses`
- Chapter content: `GET /wp-json/wp/v2/lessons`
- PDF papers: `GET /wp-json/mpboard/v1/papers`

### Authenticated Access
- Test series: `GET /wp-json/mpboard/v1/tests`
- Content management: `POST /wp-json/wp/v2/posts`
- Media upload: `POST /wp-json/wp/v2/media`
- Admin operations: Various admin endpoints

## Authentication Methods

### API Key (Recommended for Agents)
1. Register at https://mpboard.ai/register-agent
2. Get your API key from the dashboard
3. Include it in requests: `Authorization: Bearer `
   or `X-API-Key: `

### OAuth 2.0
Authorization endpoint: `https://mpboard.ai/wp-login.php?action=oauth2`
Token endpoint: `https://mpboard.ai/wp-json/mpboard/v1/token`
Scopes: `read:content`, `write:content`, `read:media`, `write:media`, `admin:site`

## Standards Compliance
- Discovery: /.well-known/openid-configuration
- Discovery: /.well-known/oauth-authorization-server
- Discovery: /.well-known/api-catalog
- Discovery: /.well-known/agent-skills/index.json
- Robot Signals: robots.txt Content-Signal directives

## Example: Agent Discovery Flow
```python
# 1. Discover API catalog
GET /.well-known/api-catalog → linkset

# 2. Discover OAuth endpoints
GET /.well-known/oauth-authorization-server → issuer, endpoints

# 3. Authenticate and obtain token
POST /wp-json/mpboard/v1/token → {access_token, scope}

# 4. Access protected resources with token
GET /wp-json/mpboard/v1/tests
Authorization: Bearer 
```

## Contact
For agent integration support: [email protected]