Unlinks an OAuth identity from the authenticated user’s account. The identity is permanently deleted, and that provider account can no longer sign in to this one. This is how a user removes a connection they don’t recognise: list them with List Identities, then unlink the one that isn’t theirs.Requires the user’s own access token; a service key is refused. The identity must belong to the authenticated user.
Headers
string
required
Bearer {accessToken} — a valid access token for the authenticated user.
Path Parameters
string
required
UUID of the identity to unlink. Retrieve identity IDs from the
List Identities endpoint.
Response
204 No Content on success, with no body.
Error Responses
Identity Not Found — 404
{ "error": "Identity not found", "code": "oauth/identity-not-found"}
Returned when the identity does not exist or does not belong to the
authenticated user.
Last Identity — 400
{ "error": "Cannot unlink the last identity. Set a password first or link another provider.", "code": "oauth/last-identity"}
Returned when this is the only identity on the account and the user
has no password set. Unlinking would lock the user out. Have the user
set a password or link another
provider first.
User Not Found — 404
{ "error": "User not found", "code": "oauth/user-not-found"}
User Token Required — 403
A service key called this endpoint, with or without actingUserId. It needs the signed-in user’s own access token.
{ "error": "This endpoint needs the user's own access token; a service key can't use it.", "code": "oauth/user-token-required"}
Acting User Not Allowed — 400
A user token, or a request with no credentials, sent actingUserId, even naming its own user. A user token always acts as its own user. (A service key gets the 403 above instead.)
{ "error": "actingUserId is only accepted with a service key. A user's own token always acts as that user.", "code": "oauth/acting-user-not-allowed"}