Skip to content

Link Identity

POST
/api/auth/link-identity
curl --request POST \
--url https://example.com/api/auth/link-identity \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "provider": "example", "code": "example" }'

Link an additional provider identity to the current user.

For the ‘email’ provider, supply the magic link code returned by verify. For future providers (Google, etc.), supply the appropriate credentials.

Body: provider: The provider to link (“email”, “slack”, “google”) code: Magic link code (for “email” provider)

Returns: {“linked”: true, “provider”: ”…”, “provider_user_id”: ”…”}

Media type application/json
LinkIdentityBody
object
provider
required
Provider
string
code
Any of:
string
Example generated
{
"provider": "example",
"code": "example"
}

Successful Response

Media type application/json
LinkIdentityResponse

Response from POST /auth/link-identity.

object
linked
required
Linked
boolean
provider
required
Provider
string
provider_user_id
required
Provider User Id
string
Example generated
{
"linked": true,
"provider": "example",
"provider_user_id": "example"
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}