---
title: "Login with email/password"
description: "Verify email/password credentials and return tokens."
---

> Documentation Index
> Fetch the complete documentation index at: https://truememory-docs.mvstg.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Auth API › Auth

`POST /auth/login`

Verify email/password credentials and return tokens.

## Request body

_Required._

- `email` (`login_auth_login_post.email`; string, required)
  - format `email`
- `password` (`login_auth_login_post.password`; string, required)
- `tenant_id` (`login_auth_login_post.tenant_id`; any of, optional) — Google Identity Platform tenant ID. Required for tenant-scoped users. Platform-wide users can omit this.
  - any of: `string`, `null`

## Example request

```json
{
  "email": "user@example.com",
  "password": "S3cur3P@ss!",
  "tenant_id": "vibrantly-1234"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://truememory-auth.mvstg.com/auth/login \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "user@example.com",
  "password": "S3cur3P@ss!",
  "tenant_id": "vibrantly-1234"
}
'
```

### TypeScript

```typescript
const url = 'https://truememory-auth.mvstg.com/auth/login';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    email: 'user@example.com',
    password: 'S3cur3P@ss!',
    tenant_id: 'vibrantly-1234'
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://truememory-auth.mvstg.com/auth/login"

payload = {
    "email": "user@example.com",
    "password": "S3cur3P@ss!",
    "tenant_id": "vibrantly-1234"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Successful Response

#### Example

```json
{
  "id_token": "string",
  "refresh_token": "string",
  "expires_in": "string",
  "user": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",
    "gip_uid": "string",
    "email": "string",
    "email_verified": false,
    "username": "string",
    "display_name": "string",
    "photo_url": "string",
    "phone_number": "string",
    "disabled": false,
    "role": "user",
    "metadata": {},
    "raw_app_meta_data": {},
    "custom_claims": {},
    "last_sign_in_at": "2019-08-24T14:15:22Z",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "deleted_at": "2019-08-24T14:15:22Z",
    "deletion_completed_at": "2019-08-24T14:15:22Z"
  }
}
```

- `id_token` (`login_auth_login_post.response.200.id_token`; string, required)
- `refresh_token` (`login_auth_login_post.response.200.refresh_token`; string, required)
- `expires_in` (`login_auth_login_post.response.200.expires_in`; string, required)
- `user` (`login_auth_login_post.response.200.user`; any of, optional)
  - any of: `AuthUser`, `null`

### 422

Validation Error

#### Example

```json
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
```

- `detail` (`login_auth_login_post.response.422.detail`; array<object>, optional)
  - `loc` (`login_auth_login_post.response.422.detail.loc`; array<any of>, required)
    - any of: `string`, `integer`
  - `msg` (`login_auth_login_post.response.422.detail.msg`; string, required)
  - `type` (`login_auth_login_post.response.422.detail.type`; string, required)
  - `input` (`login_auth_login_post.response.422.detail.input`; unknown, optional)
  - `ctx` (`login_auth_login_post.response.422.detail.ctx`; object, optional)


Source: https://truememory-docs.mvstg.com/auth/login/index.md
