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

# Complete social login REST API

POST

/api/auth/social/complete

FetchcURL

```
const url = 'http://127.0.0.1:25737/api/auth/social/complete';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"completion_token":"example","email":"hello@example.com"}'
};

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

```
curl --request POST \
  --url http://127.0.0.1:25737/api/auth/social/complete \
  --header 'Content-Type: application/json' \
  --data '{ "completion_token": "example", "email": "hello@example.com" }'
```

-

Consumes a short-lived completion token once, resolves or safely links the immutable identity, accepts a bound invitation when applicable, and returns the standard login or MFA-required shape. Microsoft first links require HitKeep email confirmation unless an authenticated session or valid invitation proves the account.

## Request Bodyrequired

application/json

object

**completion_token**

required

string

**email**

HitKeep target email required for a first unauthenticated Microsoft link.

string format: email

##### Examplegenerated

```
{
  "completion_token": "example",
  "email": "hello@example.com"
}
```

## Responses

### 200

Social login result

application/json

object

**challenge_token**

string

**factors**

Array<string>

Allowed values: totp passkey recovery_code email_link

**passkey**

object

***key***

additional properties

any

**status**

required

string

**completion_token**

Replacement one-time token returned only when signup details are required.

string

**redirect_url**

string

**status**

required

string

Allowed values: ok mfa_required signup_required verification_sent

##### Example

```
{
  "factors": [
    "totp"
  ],
  "status": "ok"
}
```

### 400

Invalid flow or target email

application/json

object

**message**

string

##### Examplegenerated

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

### 403

Account unavailable

application/json

object

**message**

string

##### Examplegenerated

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

### 409

Completion replay or identity conflict

application/json

object

**message**

string

##### Examplegenerated

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

[Previous Extend session](https://hitkeep.com/api/operations/apiauthsessionextend/)[Next Confirm Microsoft social identity](https://hitkeep.com/api/operations/apiauthsocialconfirm/)
