# Sign in

`POST /client_api/v2/auth/sign_in`

Swap a login's email and password for a token. Send the token as a bearer token on every other call. It lasts a week.

Needs no token.

## Body

- `api_user` (object, required): The login to sign in with.
  - `email` (string, required): The login's email address.
  - `password` (string, required): The login's password.

## Returns

Returns the token.

- `token` (string, required): The token to send as `Authorization: Bearer <token>` on every other call. It lasts a week.

## Errors

- `401 Unauthorized`: The token is missing, expired or invalid. Sign in again.

## Example request (curl)

```bash
curl -X POST "https://sandbox-api.vatit-stream.com/client_api/v2/auth/sign_in" \
  -H "Content-Type: application/json" \
  -d '{
    "api_user": {
      "email": "integrations@globaltradecorp.example",
      "password": "your-password"
    }
  }'
```

## Example response (200)

```json
{
  "token": "eyJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6ImludGVncmF0aW9uc0BnbG9iYWx0cmFkZWNvcnAuZXhhbXBsZSIsInN1YiI6IjkiLCJzY3AiOiJhcGlfdXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzkyNzM5Njg2LCJleHAiOiIxNzkzMzQ0NDg2IiwianRpIjoiM2YxYzJhOWUtNmI0ZC00ZThhLTljNzEtMGQ1ZThiMmY0YTE2In0.tQ3m0Yk9v1S7bT2n5Zq8Lw4HcXr6JdPaUeVgNiOfMhA"
}
```
