---
title: "Unlink social provider REST API | HitKeep"
description: "Reference for the HitKeep REST API operation Unlink social provider, including request parameters, responses, and authentication notes."
canonical: "https://hitkeep.com/api/operations/apiusersecuritysocialprovider/"
---

# Unlink social provider REST API

DELETE

/api/user/security/social/{provider}

FetchcURL

```
const url = 'http://127.0.0.1:25737/api/user/security/social/google';
const options = {
  method: 'DELETE',
  headers: {cookie: 'hk_token=<hk_token>', 'Content-Type': 'application/json'},
  body: '{"current_password":"example"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```
curl --request DELETE \
  --url http://127.0.0.1:25737/api/user/security/social/google \
  --header 'Content-Type: application/json' \
  --cookie hk_token=<hk_token> \
  --data '{ "current_password": "example" }'
```

-

Unlinks a provider only when another social provider, passkey, or recently confirmed enabled password remains usable. TOTP, recovery codes, email MFA, and team SSO do not satisfy this guard.

## Authorizations

- **[cookieAuth](https://hitkeep.com/api/#cookieauth)**

## Parameters

### Path Parameters

**provider**

required

string

Allowed values: google github microsoft

## Request Bodyrequired

application/json

object

**current_password**

string

##### Examplegenerated

```
{
  "current_password": "example"
}
```

## Responses

### 204

Provider unlinked

### 404

Identity not linked

application/json

object

**message**

string

##### Examplegenerated

```
{
  "message": "example"
}
```

### 409

No alternative primary login method

application/json

object

**message**

string

##### Examplegenerated

```
{
  "message": "example"
}
```

[Previous Regenerate recovery codes](https://hitkeep.com/api/operations/apiusersecurityrecovery-codesregenerate/)[Next Start authenticated social link](https://hitkeep.com/api/operations/apiusersecuritysocialproviderstart/)
