---
title: "Link Provider Callback"
method: POST
path: "/cabinet/auth/account/link/{provider}/callback"
tags: ["Cabinet Account Linking"]
---

# Link Provider Callback

`POST /cabinet/auth/account/link/{provider}/callback`

## Request

- The document declares no server URL.
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bedolagam/apis/remnawave-bot-admin-api/docs/cabinet/auth/account/link/:provider/callback/post.ts> (a function with typed inputs; its response is checked against the schema)

Handle OAuth callback for linking a provider to the current account.

## Path parameters

- `provider` 'google' | 'yandex' | 'discord' | 'vk', required

## Request body

- LinkCallbackRequest
  - `code` string, required: Authorization code from provider
  - `state` string, required: CSRF state token
  - `device_id` string, nullable: Device ID from VK ID callback

## Response `200`

Successful Response

- LinkCallbackResponse
  - `success` boolean, required
  - `message` string, nullable
  - `merge_required` boolean
  - `merge_token` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/bedolagam/apis/remnawave-bot-admin-api.md) - [All operations](https://skmtc.dev/bedolagam/apis/remnawave-bot-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bedolagam/apis/remnawave-bot-admin-api/revisions/2360876ff9c5?raw)
