# cli.authorize

> POST https://app.intraface.cc/api/v1/cli/authorize

A signed-in person (Clerk session cookie). Agent tokens are refused. Body limit: 256 KB.

**Auth:** signed-in session (`__session` cookie)

## Request body (application/json)

```json
{
  "type": "object",
  "properties": {
    "state": {
      "type": "string",
      "minLength": 16,
      "maxLength": 128
    },
    "code_challenge": {
      "type": "string",
      "minLength": 43,
      "maxLength": 128
    },
    "code_challenge_method": {
      "type": "string",
      "const": "S256"
    },
    "redirect_port": {
      "type": "integer",
      "minimum": 1024,
      "maximum": 65535
    },
    "label": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "agent": {
      "type": "string",
      "maxLength": 64
    }
  },
  "required": [
    "state",
    "code_challenge",
    "code_challenge_method",
    "redirect_port",
    "label"
  ]
}
```

## Responses

### 200: Success.

application/json:

```json
{
  "type": "object",
  "properties": {
    "redirect_url": {
      "type": "string",
      "format": "uri"
    }
  },
  "required": [
    "redirect_url"
  ]
}
```

### default

Any other error, in the shared envelope `{ error: { code, message, hint?, details? } }`.
