# TRAFFIX — Agent & API Authentication

> TRAFFIX (https://traffixads.com) is the official Telegram Ads reseller platform.
> Cabinet API base: `https://traffixads.com/api/`

## Human registration

1. Open https://traffixads.com/register
2. Complete the registration form (email or Telegram username + password)
3. Sign in at https://traffixads.com/login to access the cabinet

## Programmatic authentication (JWT)

TRAFFIX uses **Bearer JWT** tokens (not OAuth 2.0 authorization-code flow).

### Obtain a token

```http
POST https://traffixads.com/api/auth/login
Content-Type: application/json

{
  "emailOrTelegram": "user@example.com",
  "password": "your-password"
}
```

Response:

```json
{
  "success": true,
  "data": {
    "token": "<JWT>",
    "user": { "id": "...", "email": "...", "role": "user" }
  }
}
```

### Use the token

```http
GET https://traffixads.com/api/auth/me
Authorization: Bearer <JWT>
```

## Discovery endpoints

| Resource | URL |
|----------|-----|
| AI catalog (ARD) | https://traffixads.com/.well-known/ai-catalog.json |
| Developers portal | https://traffixads.com/developers |
| API catalog (RFC 9727) | https://traffixads.com/.well-known/api-catalog |
| OpenAPI | https://traffixads.com/.well-known/openapi.json |
| OAuth AS metadata (RFC 8414) | https://traffixads.com/.well-known/oauth-authorization-server |
| Protected resource (RFC 9728) | https://traffixads.com/.well-known/oauth-protected-resource |
| OIDC discovery | https://traffixads.com/.well-known/openid-configuration |
| Agent skills index | https://traffixads.com/.well-known/agent-skills/index.json |
| MCP server card | https://traffixads.com/.well-known/mcp/server-card.json |
| LLM brief | https://traffixads.com/llms.txt |
| Health | https://traffixads.com/api/health |

## Support contacts

- Telegram support: https://t.me/traffix_support
- Manager Alina: https://t.me/alina_traffix
- Email: support@traffixads.com

## Scopes

- `cabinet:read` — read campaigns, analytics, balance
- `cabinet:write` — create and update campaigns, creatives, channels

## Content usage

See `/robots.txt` Content-Signal directives for AI training and search preferences.
