> For the complete documentation index, see [llms.txt](https://emotiv.gitbook.io/cortex-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://emotiv.gitbook.io/cortex-api/overview-of-api-flow/offline-support.md).

# Offline support

Once the app [authenticates](/cortex-api/authentication/authorize.md) with the Cortex successfully, it can use the Cortex token to stay offline while working with Cortex for a period of time (see soft limit, hard limit below).

Here is the recommended flow to work offline with Cortex:

**Step 1:** Follow [this API flow ](/cortex-api/overview-of-api-flow.md)to get Cortex token the first time. This flow requires the Internet connection. A Cortex token will be available for 48 hours.

**Step 2:** When the Cortex token is expired, call [generateNewToken](/cortex-api/authentication/generatenewtoken.md) API to generate another token. This API doesn't require the Internet connection.

**Step 3**: Check soft limit, hard limit of the current license via [getLicenseInfo](/cortex-api/authentication/getlicenseinfo.md) API and warn the users to be online.

&#x20;In the license information, there are 2 fields "softLimitTime" and "hardLimitTime".

### softLimitTime

This is the reasonable time to warn users that the app will not be able to use offline soon. The app can still work offline until **hardLimitTime**.

### hardLimitTime

This is the time that the app will be no longer to use offline. The app must call [authorize](/cortex-api/authentication/authorize.md) API with the Internet connection to be able to continue working with Cortex.

{% hint style="info" %}
The **softLimitTime** will be at least 1 month later from the time the app calls [authorize](/cortex-api/authentication/authorize.md) API. The **hardLimitTime** is 7 days after **softLimitTime**.
{% endhint %}
