---
title: "Authorize an OAuth client"
method: POST
path: "/o/authorize/"
tags: ["OAuth"]
---

# Authorize an OAuth client

`POST /o/authorize/`

## Request

- Base URL: `http://api.cannoli.app/api/v1`
- URL: `http://api.cannoli.app/api/v1/o/authorize/`
- Auth: none declared

Authorize the user to access the Cannoli API.

You must first make a request to the create_key_pair endpoint in order to obtain the read and write keys.

The write key must be sent in the `state` parameter to assign the created token to the previously requested
key pair.

## Request body

- FigmaAllow
  - `allow` boolean
  - `redirect_uri` string, required
  - `scope` string, required
  - `client_id` string, required
  - `state` string, required
  - `response_type` string, required

## Response `200`

User login response

- TokenResponse
  - `access_token` string, required
  - `expires_in` integer, required
  - `token_type` 'Bearer', required
  - `scope` string, required
  - `refresh_token` string, required

---

[API](https://skmtc.dev/cannoli/apis/cannoli-backend-api.md) - [All operations](https://skmtc.dev/cannoli/apis/cannoli-backend-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cannoli/apis/cannoli-backend-api/revisions/d27aef14fd7a?raw)
