# IRPCLogin.KeepAlive

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md) > [Login and sessions](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/KeepAlive/

Badges: `Vault API / core` `session` `session` `idempotent`

Tells the server that the session is still in use, so that it does not expire.

- **Service:** [Login and sessions](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/index.md) `MFiles.IRPCLogin`
- **gRPC method:** `/MFiles.IRPCLogin/KeepAlive`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/keep-alive`
- **Request:** [`KeepAliveRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/KeepAlive/index.md#request)
- **Response:** [`KeepAliveResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/KeepAlive/index.md#response)
- **Book and level:** Vault API, core
- **Kind:** session
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** yes
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

Call it at least every `session_data.keep_alive_interval_in_seconds` seconds (half the server's
session timeout; 450 seconds with the default 15-minute timeout). Only this call resets the idle
timer; other calls do not. When the timeout elapses, the session expires.

`KeepAlive` fails with `UNAUTHENTICATED` when the session has expired or was logged out. Then log
in again with [LogIn](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/LogIn/index.md).

<a id="request"></a>

## Request: KeepAliveRequest

No fields.

<a id="response"></a>

## Response: KeepAliveResponse

No fields.

<a id="related"></a>

## Related methods

- [LogIn](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/LogIn/index.md): Authenticates the caller and opens a session to a vault, or to the server when the vault GUID is all zeros.
