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

# Establishing a Connection

After authenticating a WebSocket connection:

* The first message sent from the client to MLink must be an **MLinkLogon** message containing either an API Key or SessionKey.

* The first message sent from MLink to the client will be an **MLinkAdmin** message containing an application state \[LoggedOn, WaitingForLogon, AuthError, OtherError] depending on the authentication state.

If at any time during a session, a user sends an **MLinkLogon** message, the server will attempt to (re-)authenticate the user and will return an **MLinkAdmin** message.
