> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-xsoar-8-on-prem/8.13/configure-cortex-xsoar/integrations/add-an-integration-instance/troubleshoot-integrations.md).

# Troubleshoot integrations

When troubleshooting integrations, do the following:

* Use the **Test** button in the integration instance.
* Verify the integration settings. Check settings such as usernames, URLs, and passwords.
* Download the debug log file and review its contents.

  In the following example, you receive a 401 unauthorized error code after testing the integration.

  ![integration-error.png](/files/TfOJ5x9G0U20H9LGuSEA)

  Click **Run Test & Download Debug** log, to download the debug file locally. You can verify what server the URL request is being forwarded to and any other reasons as to why you received this error code. The 401 unauthorized error code usually relates to invalid error credentials, expired tokens, or incorrect API settings.
* Enable verbose or debug-level logging on the integration.
* Review the integration logs (**Settings & Info** → **Settings** → **Integrations** → **Integration Logs**).

  You can sort the logs by things such as source instance, command, and log level. You can also export the file

If you are unable to fix the integration, contact Customer Support for further assistance.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/cortex-xsoar-8-on-prem/8.13/configure-cortex-xsoar/integrations/add-an-integration-instance/troubleshoot-integrations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
