Skip to main content
POST
Link OAuth Provider
Initiates an OAuth 2.0 flow to link an additional provider to the currently authenticated user’s account. Requires a valid access token. The flow and callback behavior are identical to the Authorize OAuth endpoint. The authenticated user’s ID is taken from the access token — it cannot be specified in the request body.

Headers

Authorization
string
required
Bearer {accessToken} — a valid access token for the user linking the provider.

Body Parameters

provider
string
required
The OAuth provider to link. Must be one of: "google", "github", "apple", "facebook".
redirectAfterAuth
string
required
The URL to redirect the user to after authorization. Must be a valid URL and must be in the provider’s configured allowed redirect URIs.

Response

authorizationUrl
string
The provider’s authorization URL. Redirect the user’s browser to this URL.

Callback

After the user authorizes with the provider, they are redirected to redirectAfterAuth with one of: On success — Tokens in the URL fragment (new tokens are issued for the linked account):
On error — Error details in query parameters:

Error Responses

See Also