> ## Documentation Index
> Fetch the complete documentation index at: https://docs.elumenta.ru/llms.txt
> Use this file to discover all available pages before exploring further.

# Google OAuth

> Sign in or register with a Google account

<ParamField body="id_token" type="string" required>
  Google ID token obtained from the Google OAuth flow on your client.
</ParamField>

## Flow

1. Client initiates Google Sign-In and receives an `id_token`
2. Send the `id_token` to this endpoint
3. Elumenta verifies it with Google, creates or logs in the user
4. Returns the same JWT pair as [Login](/en/api-reference/auth/login)

## Request

```bash theme={null}
curl -X POST https://elumenta.ru/api/v2/auth/google \
  -H "Content-Type: application/json" \
  -d '{"id_token": "eyJhbGciOiJSUzI1NiJ9..."}'
```

## Response

```json theme={null}
{
  "access_token": "eyJhbGciOiJIUzI1NiJ9...",
  "refresh_token": "eyJhbGciOiJIUzI1NiJ9...",
  "token_type": "bearer",
  "is_new_user": false,
  "user": {
    "id": 12345,
    "email": "user@gmail.com",
    "plan": "free",
    "token_balance": 50
  }
}
```
