Available languages: [Python](https://databento.com/docs/api-live/gateway-control-messages/authentication-response.python.md) · [C++](https://databento.com/docs/api-live/gateway-control-messages/authentication-response.cpp.md) · [Rust](https://databento.com/docs/api-live/gateway-control-messages/authentication-response.rust.md) · [Raw](https://databento.com/docs/api-live/gateway-control-messages/authentication-response.raw.md)

Source: https://databento.com/docs/api-live/gateway-control-messages/authentication-response


### Authentication response

The gateway sends this response following the client's [authentication request](https://databento.com/docs/api-live/client-control-messages/authentication-request.md).

#### Example message
```text
success=1|session_id=100322\n
```

#### Fields

| Field | Required | Type | Description |
| `success` | required | string | Set to `1` if the client was successfully authenticated, `0` otherwise. |
| `error` | optional | string | A description of the authentication error if the client was not successfully authenticated. |
| `session_id` | optional | string | A unique identifier representing the established session. |
