Skip to Content
kosemdocs
ReferenceAPIUsers

Delete linked account

Removes a linked account, signs out other sessions created with that provider and notifies the user by email. Requires a sign-in within the last 10 minutes (otherwise fails with RECENT_SIGN_IN_REQUIRED). Signing in with the account again re-links it (immediately for Google, or after email code verification for GitHub). Fails with failed_precondition for a Google account when only Google sign-in is enabled.

DELETE
/v1/users/{user}/linkedAccounts/{linkedAccount}

Removes a linked account, signs out other sessions created with that provider and notifies the user by email.

Requires a sign-in within the last 10 minutes (otherwise fails with RECENT_SIGN_IN_REQUIRED). Signing in with the account again re-links it (immediately for Google, or after email code verification for GitHub). Fails with failed_precondition for a Google account when only Google sign-in is enabled.

Authorization

bearer
headerAuthorizationBearer <token>

An access token, or an API key.

Path Parameters

user*string

The user's ID, or me for the caller.

Match^(me|usr_[0-7][0-9a-hjkmnp-tv-z]{25})$
linkedAccount*string

The account's provider and its ID there, such as github-583231.

Match^(google-[0-9A-Za-z._-]{1,255}|github-[1-9][0-9]{0,18})$

Response Body

No Content

Example Request
curl -X DELETE 'https://api.kosem.ai/v1/users/string/linkedAccounts/string'
Example Response
Empty