Skip to main content

deleteUserExternalAccount()

Deletes an external account for the given user.

Returns the DeletedObject object.

function deleteUserExternalAccount(params: DeleteUserExternalAccountParams): Promise<DeletedObject>
  • Name
    externalAccountId
    Type
    string
    Description

    The ID of the external account to delete.

  • Name
    userId
    Type
    string
    Description

    The ID of the user to delete the external account for.

Note

Using clerkClient varies based on the SDK you're using. Refer to the overview for usage details, including guidance on how to access the userId and other properties.

const userId = 'user_123'
const externalAccountId = 'external_account_123'

const response = await clerkClient.users.deleteUserExternalAccount({
  userId,
  externalAccountId,
})

Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint DELETE/users/{user_id}/external_accounts/{external_account_id}. See the BAPI reference for more information.

Feedback

What did you think of this content?

Last updated on