---
title: "Exchange PKCE authorization code for an API key"
method: POST
path: "/api/cli/auth/exchange"
tags: ["CLI Auth"]
---

# Exchange PKCE authorization code for an API key

`POST /api/cli/auth/exchange`

## Request

- Base URL: `https://slidesfly.com`
- URL: `https://slidesfly.com/api/cli/auth/exchange`
- Auth: none required

## Request body

- object
  - `code` string, required
  - `code_verifier` string, required

## Response `200`

API key issued

- ApiKeyExchangeSuccess
  - `ok` unknown, required
  - `data` object, required
    - `api_key` string, required
    - `prefix` string, required

## Other responses

- `401`: Missing or invalid credentials
- `429`: Rate limited

---

[API](https://skmtc.dev/slidesfly/apis/slidesfly-http-api.md) · [All operations](https://skmtc.dev/slidesfly/apis/slidesfly-http-api/llms.txt) · [OpenAPI document](https://skmtc.dev/slidesfly/apis/slidesfly-http-api/revisions/9da38f802ead?raw)
