---
title: "Link Server Complete"
method: POST
path: "/cabinet/auth/account/link/server-complete"
tags: ["Cabinet Account Linking"]
---

# Link Server Complete

`POST /cabinet/auth/account/link/server-complete`

Complete OAuth account linking without JWT.

Authenticates via the one-time state token stored in Redis during link_provider_init.
Used when OAuth opens in an external browser (e.g., from Telegram Mini App).
Provider is resolved from the state token if not explicitly provided.

## Request body

- ServerCompleteRequest
  - `code` string, required — Authorization code from provider
  - `state` string, required — CSRF state token
  - `provider` 'google' | 'yandex' | 'discord' | 'vk', nullable — OAuth provider name (resolved from state if omitted)
  - `device_id` string, nullable — Device ID from VK ID callback

## Response `200`

Successful Response

- ServerCompleteResponse
  - `success` boolean, required
  - `message` string, nullable
  - `merge_required` boolean
  - `merge_token` string, nullable
  - `provider` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/bedolagam/apis/remnawave-bot-admin-api.md) · [All operations](https://skmtc.net/bedolagam/apis/remnawave-bot-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bedolagam/remnawave-bot-admin-api/revisions/45956d1b13ec/schema)
