# Agent authentication: config

Canonical URL: https://sosoapi.ai/docs/api/identity-api-agent-auth-config

Contract: sha256:563d2d581da0ad29

Read the agent sign-in configuration, including the fixed loopback callback. Use a supported CLI or remote OAuth client to sign in; this endpoint documents the protocol.

POST /identity-api/agent-auth/config

## Authentication and permissions

- **Accepted credential classes:** anonymous

- **Delegated capability:** oauth-bootstrap

- **Minimum workspace role:** No workspace-role minimum in this contract; ownership and grant checks still apply.

- **Access scope:** Resources this user is authorized to access

- **All-workspace consent required:** No

- **Changes state:** No

- **When the operation is complete:** not_agent_callable

A token can use only the rights held by its owner. Each request checks workspace membership, resource ownership, selected workspaces and granted capabilities. Core and full profiles change which tools are displayed; they do not grant access.

This endpoint belongs to the sign-in protocol and is not available through api post. Use the supported browser sign-in flow, and keep session credentials out of output and logs.

## Request fields

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

## Response and completion

Success HTTP statuses: 200

A successful HTTP response can mean that a request was accepted rather than completed. For background work, save the returned ID and check the same operation until it finishes. A scheduled or accepted post is published only when the platform confirms it; a client timeout does not establish the result.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "client_id": {
      "type": "string",
      "minLength": 1
    },
    "client_name": {
      "type": "string",
      "minLength": 1
    },
    "redirect_uri": {
      "type": "string",
      "const": "http://127.0.0.1:8789/oauth/callback"
    },
    "authorization_endpoint": {
      "type": "string",
      "format": "uri"
    },
    "token_endpoint": {
      "type": "string",
      "format": "uri"
    },
    "scopes": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "client_id",
    "client_name",
    "redirect_uri",
    "authorization_endpoint",
    "token_endpoint",
    "scopes"
  ]
}
```

## Errors and safe retries

Check the HTTP status and response body. A 400 validation error may contain a ZodError; handler errors use error, message and code fields. Keep request_id or x-request-id for diagnosis, without credentials. Fix 401/403 access errors before retrying, and follow Retry-After for 429. If a write is uncertain or returns 5xx, read the existing result first. Reuse an idempotency key only where supported; retry behaviour varies by operation and does not guarantee exactly-once delivery.

## Examples

These examples use fictional values checked against the schemas. Replace the IDs with ones you are authorized to use, the media with ready assets and the dates with your confirmed publishing time. Check the account’s eligibility before submitting a write. This page sends no API requests.

request.json

```json
{}
```

cURL

```bash
curl --request POST \
  "https://gqeshlawtcexsapabaui.supabase.co/functions/v1/identity-api/agent-auth/config" \
  -H "Content-Type: application/json" \
  --data-binary @request.json
```

JavaScript

```js
// Server-side JavaScript. Do not print tokens or credential-bearing responses.
const response = await fetch("https://gqeshlawtcexsapabaui.supabase.co/functions/v1/identity-api/agent-auth/config", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({})
});
const result = await response.json();
// Check response.ok, the operation-specific body and completion state before continuing.
```

Synthetic response example

```json
{
  "client_id": "example",
  "client_name": "example",
  "redirect_uri": "http://127.0.0.1:8789/oauth/callback",
  "authorization_endpoint": "https://example.com/media.png",
  "token_endpoint": "https://example.com/media.png",
  "scopes": "example"
}
```

## Related tools and guides

[API reference](https://sosoapi.ai/docs/api)
