# OI:LOOP auth.md

OI:LOOP supports agentic registration. AI agents can register themselves without a human sign-up, using the anonymous method.

- Resource server: `https://oiloop.com/mcp` (MCP, streamable HTTP)
- Authorization server: `https://oiloop.com`

## Audience

AI agents and assistants acting for a person who wants information about OI:LOOP or wants to join the early API waitlist.

## 1. Discover

1. Read the Protected Resource Metadata: `GET https://oiloop.com/.well-known/oauth-protected-resource`. It lists `resource`, `authorization_servers`, `scopes_supported` and `bearer_methods_supported` (`header`).
2. Read the Authorization Server metadata: `GET https://oiloop.com/.well-known/oauth-authorization-server`. Its `agent_auth` block gives `skill`, `register_uri`, `claim_uri`, `revocation_uri` and `identity_types_supported`.

If this file and the metadata disagree, the metadata wins.

## 2. Pick a method

Only `anonymous` is supported. No session exchange (`identity_assertion`) and no verified email are needed. A person can claim the registration later (step 4).

## 3. Register

```http
POST /agent-auth.php?op=register HTTP/1.1
Host: oiloop.com
Content-Type: application/json

{"identity_type": "anonymous", "credential_type": "access_token", "scope": "mcp:read waitlist:join"}
```

```json
{
  "identity_type": "anonymous",
  "subject": "anon_3f9c2a71d0b84e15",
  "access_token": "<token>",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "mcp:read waitlist:join",
  "claim_token": "<claim_token>",
  "claim_uri": "https://oiloop.com/agent-auth.php?op=claim",
  "resource": "https://oiloop.com/mcp"
}
```

## 4. Claim (optional)

When the person wants to own the registration and join the early waitlist, send their own email with the claim token. Only do this when the person asked and gave the email.

```http
POST /agent-auth.php?op=claim HTTP/1.1
Host: oiloop.com
Content-Type: application/json

{"claim_token": "<claim_token>", "email": "person@example.com", "name": "Optional Name"}
```

```json
{"status": "claimed", "subject": "anon_3f9c2a71d0b84e15", "email": "person@example.com"}
```

The claim token is valid for 7 days. OI:LOOP replies from info@oiloop.com.

## 5. Use the access token

Send it in the header on MCP requests:

```http
POST /mcp HTTP/1.1
Host: oiloop.com
Authorization: Bearer <token>
Content-Type: application/json
Accept: application/json, text/event-stream
```

Tokens last 1 hour; register again for a new one. There is no refresh token. The MCP server's public tools also answer without a token.

Never send passwords, API keys or personal secrets to OI:LOOP.

## Errors

| Error | Endpoint | What to do |
|---|---|---|
| `unsupported_identity_type` | `/agent-auth.php?op=register` | Use `anonymous` |
| `unsupported_credential_type` | `/agent-auth.php?op=register` | Use `access_token` |
| `invalid_scope` | `/agent-auth.php?op=register` | Request `mcp:read` and/or `waitlist:join` |
| `invalid_grant` | `/agent-auth.php?op=claim` | Claim token expired or invalid: register again |
| `invalid_request` | `/agent-auth.php?op=claim` | Send a valid email of the person |
| `slow_down` (429) | all | Wait for `Retry-After`; limit 20 requests per hour per address |

## Revocation

`POST https://oiloop.com/agent-auth.php?op=revoke` with `{"token": "<token>"}`. It always returns 200 (RFC 7009). Tokens are short-lived and expire on their own after 1 hour.

Contact: info@oiloop.com · Last updated: 2026-10-26
