# The stateManager.getSelfGuid() method
This documents the `stateManager.getSelfGuid()` method.

This is perhaps the simplest method of the `stateManager`, as its response is a simple string which is the guid of the currently connected client.
## General usage:
```ts
const myGuid: string = taClient.stateManager.getSelfGuid();
```

There is not much more to explain here. This method will simply return the currently connected client's GUID. 

It can be useful in scenarios such as:
```ts
async function addSelfToMatch() {
    if(!match?.associatedUsers.includes(client.stateManager.getSelfGuid())) {
        const response = await client.addUserToMatch(tournamentGuid, matchGuid, client.stateManager.getSelfGuid());
        console.log("Added Self to match!", response);
    }
}
```
<div class="info-box">
    <span class="material-icons">info</span>
    <div>
        <strong>Example:</strong> This is an example from the page of ShyyTAUI within the match coorination page. 
    </div>
</div>

The example above demonstrates the `addSelfToMatch` method used in ShyyTAUI in order to ensure that the coordinator is correctly connected and associated to the match. 