> For the complete documentation index, see [llms.txt](https://docs.instruqt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.instruqt.com/resources/faq/troubleshooting-instruqt-cli-authentication-issues.md).

# Troubleshooting Instruqt CLI Authentication Issues

During the usage of Instruqt CLI, you might encounter an error message like this:

```
[ERROR] token is malformed: token contains an invalid number of segments
```

This error typically occurs when you run a command like:

```bash
instruqt track pull instruqt-demos/test
```

The error is usually a result of expired authentication.

## Solution

To solve this issue, you need to re-authenticate by using the following command:

```bash
instruqt auth login
```

After running the command, log in with your Single Sign-On (SSO) credentials.

## Preventive Measures

To prevent similar issues in the future, you can regularly update Instruqt and delete the existing credentials folder. Use the following commands:

* To update Instruqt:

  ```bash
  instruqt update
  ```
* To delete the existing credentials folder:

  ```bash
  rm -rf .config/instruqt/credentials
  ```

By following these steps, you should be able to resolve and prevent most Instruqt CLI authentication issues.
