# Authentication

After your application is successfully [connected](/cortex-api/connecting-to-the-cortex-api.md) to the Cortex service, you must go through the authentication procedure.

First, you should call [getUserLogin](/cortex-api/authentication/getuserlogin.md) to check if the user has already logged in though [EMOTIV Launcher](https://emotiv.gitbook.io/emotiv-launcher/). Then, you must call [requestAccess](/cortex-api/authentication/requestaccess.md) to ask the user to approve your application.

Finally, call [authorize](/cortex-api/authentication/authorize.md) to generate a Cortex token or you can reuse a token that you previously got from this method, if it is not expired.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://emotiv.gitbook.io/cortex-api/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
