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

# Start social authentication REST API

POST

/api/auth/social/{provider}/start

FetchcURL

```
const url = 'http://127.0.0.1:25737/api/auth/social/google/start';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"flow":"login","invite_token":"example","remember_me":true,"return_url":"example"}'
};

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/google/start \
  --header 'Content-Type: application/json' \
  --data '{ "flow": "login", "invite_token": "example", "remember_me": true, "return_url": "example" }'
```

-

Starts a login, signup, or invitation flow using authorization code, browser-bound one-time state, PKCE S256, and an OIDC nonce where applicable. Return URLs are restricted to safe local application paths.

## Parameters

### Path Parameters

**provider**

required

string

Allowed values: google github microsoft

## Request Bodyrequired

application/json

object

**flow**

required

string

Allowed values: login signup invite

**invite_token**

string

**remember_me**

boolean

**return_url**

Optional safe local application path.

string

## Responses

### 200

Provider authorization URL

application/json

object

**auth_url**

required

string format: uri

##### Examplegenerated

```
{
  "auth_url": "https://example.com"
}
```

### 400

Invalid flow

application/json

object

**message**

string

##### Examplegenerated

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

### 404

Provider or social signup unavailable

application/json

object

**message**

string

##### Examplegenerated

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

### 503

Provider unavailable

application/json

object

**message**

string

##### Examplegenerated

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

[Previous Validate social provider callback](https://hitkeep.com/api/operations/apiauthsocialprovidercallback/)[Next Get SSO availability](https://hitkeep.com/api/operations/apiauthsso/)
