> For the complete documentation index, see [llms.txt](https://gley.gitbook.io/easy-achievements/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gley.gitbook.io/easy-achievements/complete-api/login.md).

# LogIn

## Description

Login the player, should be called just once at the beginning of your game.&#x20;

If the player is not logged in, no other method will work.

## Declaration

```csharp
public static void LogIn(UnityAction<bool> loginComplete = null)
```

## Parameters

<table><thead><tr><th width="206">Name</th><th>Description</th></tr></thead><tbody><tr><td><strong>loginComplete</strong></td><td>Callback called after login process ends.<br>bool true -> login was successful<br>bool false -> login failed</td></tr></tbody></table>

## Example

```csharp
public class Test : MonoBehaviour
{
    void Start()
    {
        Gley.GameServices.API.LogIn(LoginComplete);
    }
    
    private void LoginComplete(bool success)
    {
        if (success == true)
        {
            //Login was successful
        }
        else
        {
            //Login failed
        }
    }
}
```
