---
title: "Link OAuth provider to current user"
method: POST
path: "/auth/oauth/{provider}/link"
tags: ["OAuth Authentication"]
---

# Link OAuth provider to current user

`POST /auth/oauth/{provider}/link`

## Request

- Base URL: `https://api.volcano.dev`
- URL: `https://api.volcano.dev/auth/oauth/{provider}/link`
- Auth: HTTP bearer

Generates authorization URL to link OAuth provider to existing account.
User must be authenticated.

## Path parameters

- `provider` 'google' | 'github' | 'microsoft' | 'apple', required

## Query parameters

- `redirect_url` string
- `client_state` string
- `response_mode` 'code'

## Response `200`

Authorization URL generated

- object
  - `authorization_url` string

## Other responses

- `400`: redirect_url is not registered in allowed_redirect_urls
- `401`: Not authenticated
- `404`: OAuth provider not configured
- `409`: Provider already linked

## Changes

- **2026-09-19** `3a6f365f3f35`: 4 breaking, 8 info
  - the response's body type changed from no type to `object` for status `400`
  - the response's body type changed from no type to `object` for status `401`
  - the response's body type changed from no type to `object` for status `404`
  - the response's body type changed from no type to `object` for status `409`
  - …8 more
- **2026-08-27** `bb44e98aba2e`: 6 breaking, 3 warning, 4 info
  - the response's body type changed from `object` to no type for status `401`
  - the response's body type changed from `object` to no type for status `404`
  - the response's body type changed from `object` to no type for status `409`
  - removed the required property `error` from the response with the `401` status
  - …9 more
- **2026-07-27** `bb52784e098a`: 3 info
  - added the optional property `code` to the response with the `401` status
  - added the optional property `code` to the response with the `404` status
  - added the optional property `code` to the response with the `409` status

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/auth/oauth/:provider/link/post.md)

---

[API](https://skmtc.dev/kong/apis/volcano-api.md) - [All operations](https://skmtc.dev/kong/apis/volcano-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/volcano-api/revisions/84c4488f91e9?raw)
