# D2 Group Authentication Guide for AI Agents & API Consumers

This document outlines authentication policies, protocol requirements, and discovery mechanisms for autonomous AI agents, scrapers, and programmatic clients interacting with D2 Group infrastructure (`d2group.co` and `seo.d2group.co`).

## 1. Public & Unauthenticated Resources
No credentials or API tokens are required for:
- Discovery endpoints: `/.well-known/api-catalog`, `/.well-known/agent-card.json`, `/.well-known/mcp/server-card.json`, `/.well-known/oauth-protected-resource`
- Agent documentation: `/llms.txt`, `/llms-full.txt`, `/robots.txt`, `/sitemap.xml`
- Public Lead Submission: `POST https://d2group.co/api/contact` (subject to IP rate limits: 5 submissions per 10 minutes)

## 2. Protected Agent & MCP Services
Access to real-time B2B intelligence and OpenSEO MCP tools (`https://seo.d2group.co/api/mcp`) requires a Bearer token or API key.

### HTTP Header Authentication
```http
Authorization: Bearer <API_TOKEN>
```
or
```http
X-API-Key: <YOUR_API_KEY>
```

## 3. OAuth 2.0 Discovery
For automated token negotiation, follow OAuth 2.0 Authorization Server Discovery:
- Configuration: `https://d2group.co/.well-known/oauth-authorization-server`
- Token Endpoint: `https://d2group.co/oauth/token`
- Supported Grant: `client_credentials`
- Scopes:
  - `read:intelligence`: Read market intelligence, brand data, and SERP citations.
  - `write:leads`: Ingest verified prospect and contact leads.
  - `mcp:tools`: Invoke MCP automated tools and crawlers.

## 4. Contact & Support
For API key requests or developer partnerships, contact: `company@d2group.co`.
