> For the complete documentation index, see [llms.txt](https://developer.textmaster.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.textmaster.com/overview/troubleshooting.md).

# Troubleshooting

Learn how to resolve the most common problems people encounter in the REST API.

If you're encountering some oddities in the API, here's a list of resolutions to some of the problems you may be experiencing. If you have any problems or requests, please contact [TextMaster support](mailto:support@textmaster.com).

## Not all results returned

Most API calls accessing a list of resources (e.g., abilities, projects, documents, etc.) support pagination. If you're making requests and receiving an incomplete set of results, you're probably only seeing the first page. You'll need to request the remaining pages in order to get more results.

## OAuth Authentication errors

When exchanging a code for an access token, additional errors can occur. The format of these error responses is determined by the `Accept` header you pass.

The examples below only show JSON responses.

### Incorrect client credentials

If the `client_id` and or `client_secret` you pass are incorrect you will receive this error response:

```json
{
  "error": "invalid_client",
  "error_description": "Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method."
}
```

To solve this error, make sure you have the correct credentials for your OAuth App. Double check the `client_id` and `client_secret` to make sure they are correct and being passed correctly to TextMaster.

### Redirect URI mismatch

If you provide a `redirect_uri` that doesn't match what you've registered with your OAuth App, you'll receive this error message:

```json
{
  "error": "invalid_grant",
  "error_description": "The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client."
}
```

To correct this error, provide the same callback URL as registered with your application.

### Invalid verification code

If the verification code you pass is incorrect, expired, or doesn't match what you received in the first request for authorization you will receive this error:

```json
{
  "error": "invalid_grant",
  "error_description": "The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client."
}
```

To solve this error, start the [OAuth authorization](/apps/building-oauth-apps/authorizing-oauth-apps.md#request-a-users-textmaster-identity-1) process again and get a new code.

### Invalid refresh token

If the refresh token you pass is incorrect, expired, or doesn't match what you received in access token request you will receive this error:

```json
{
  "error": "invalid_grant",
  "error_description": "The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client."
}
```

To solve this error, start the [OAuth access token](/apps/building-oauth-apps/authorizing-oauth-apps.md#exchange-an-oauth-code-for-a-users-access-token) process again and get a new refresh token.

## Timeouts

If TextMaster takes more than 30 seconds to process an API request, TextMaster will terminate the request and you will receive a timeout response. Make sure to use async endpoints when available to overcome this issue.&#x20;


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.textmaster.com/overview/troubleshooting.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
