# Invalid credentials

Discover the solution for authentication issues.

If you see an error message like the one below in your console, you are likely experiencing an authentication issue.

> **Error**
>
> The request was not authorized, most likely due to invalid credentials.

The following sections explain the possible causes and solutions for this issue.

## Invalid Application ID

Our servers refuse requests from applications with an invalid Application ID or coming from an [unauthorized domain](/reference/sdk/javascript/troubleshooting/problem/unauthorized-origin).

To make sure you are using the correct Application ID, check the [Integration page](https://app.croct.com/redirect/organizations/-organization-/workspaces/-workspace-/applications/-application-/integration) of your application.

## Invalid environment

Trying to use a production Application ID in a local environment or vice versa is not allowed. Make sure you are using the correct Application ID for the environment you are working in, which can be found on the [Integration page](https://app.croct.com/redirect/organizations/-organization-/workspaces/-workspace-/applications/-application-/integration) of your application.

## Invalid user token

If the user [token](/explanation/application/signed-tokens) is invalid - due to expiration, tampering, or other issues - the request will be blocked. To fix this, you can either delete the token or set a new one. Typically, clearing your cookies and local storage will resolve the issue.

> **Question: How to clear my user token?**
>
> Follow these steps to clear cookies and local storage in Chrome:
>
> 1. Right-click on the page and select **Inspect** to open developer tools
>
> 2. Go to the "Application" tab
>
> 3. Under **Storage** click **Cookies** and select your domain.
>
> 4. Click **Clear all** to remove all cookies.
>
> 5. Do the same for **Local Storage** under your domain.

Another issue might be sending an [unsigned token](/explanation/application/signed-tokens#unsigned-tokens) when the **Require signed token** option is enabled in the [Application settings](https://app.croct.com/redirect/organizations/-organization-/workspaces/-workspace-/applications/-application-/settings).

While you can turn off this option, doing so may increase security risks, like impersonation attacks. We recommend leaving it on and signing your tokens.
