# 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.


---

# 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://docs.instruqt.com/resources/faq/troubleshooting-instruqt-cli-authentication-issues.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.
