---
title: "Approve CLI device authorization"
method: POST
path: "/cli/auth/approve"
tags: ["Auth"]
---

# Approve CLI device authorization

`POST /cli/auth/approve`

## Request

- Base URL: `https://app.openpo.st/api/v1`
- URL: `https://app.openpo.st/api/v1/cli/auth/approve`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `openpost_session`

## Request body

- ApproveCLIAuthInputBody
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `device_code` string
  - `name` string: Name for the resulting API token
  - `scopes` string: Compatibility field; when present it must match the displayed requested scope
  - `user_code` string
  - `workspace_id` string: Workspace the resulting token is limited to

## Response `200`

OK

- CLIAuthDecisionOutputBody
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `ok` boolean, required

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/openpo/apis/openpost-api.md) · [All operations](https://skmtc.dev/openpo/apis/openpost-api/llms.txt) · [OpenAPI document](https://skmtc.dev/openpo/apis/openpost-api/revisions/67d3964458a7?raw)
