---
title: "Generate desktop authentication code"
method: POST
path: "/v1/authentication/generate-desktop-code"
tags: ["Authentication Controller"]
---

# Generate desktop authentication code

`POST /v1/authentication/generate-desktop-code`

Generates a one-time code for desktop app authentication

## Request body

- TokenBean
  - `authToken` string
  - `refreshToken` string
  - `userId` string
  - `platformType` string

## Response `200`

Code generated successfully

- DesktopCodeResponse
  - `code` string

## Other responses

- `401` — User not authenticated
- `500` — Internal server error

---

[API](https://skmtc.dev/floik/apis/floik-authentication-server.md) · [All operations](https://skmtc.dev/floik/apis/floik-authentication-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/floik/floik-authentication-server/revisions/2b2a5dad2f5e/schema)
