> For the complete documentation index, see [llms.txt](https://legacy-docs.usesmileid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://legacy-docs.usesmileid.com/further-reading/troubleshooting/troubleshooting-error-2204-and-2205-youre-not-authorized-to-do-that.md).

# Troubleshooting error 2204 & 2205 - "You're not authorized to do that"

Error code 2204 & 2205 are authorisation errors, meaning the signature you used in running your query is not authorised to perform the job.

This error is indicative of one of the following possible issues:

* **Signature Miscalculation**: The correct API key is not being used for the intended environment (Sandbox/Production).
* **Hitting the Wrong URL**: The signature, though correctly generated, is used to send requests to the wrong url (environment)
* The generation of the signature does not follow the instructions in the [documentation](https://docs.usesmileid.com/integration-options/rest-api/signing-your-api-request/generate-signature#generating-the-signature)
* **Incorrect timestamp**: The Timestamp sent in the request body does not adhere to the format: “yyyy-MM-dd’T’HH:mm:ss.fffK”
* The timestamp sent in the request body is not the same as the timestamp used to generate the signature: Ensure that the timestamp in your request body matches the exact timestamp used to generate the signature, rather than generating a new timestamp.

### Signature Miscalculation

1\. Wrong environment API key - Confirm you're using the right environment API key i.e. for sandbox signature, you will use sandbox API key, likewise for production signature you will use production API key. You can switch between sandbox and production by using the toggle in the portal.

![](/files/Vn0OQ2CglSOTYP8XHLbY)

2\. Missed a step in calculating the signature - You can follow these [instructions](https://docs.usesmileid.com/integration-options/rest-api/signing-your-api-request/generate-signature#generating-the-signature) to calculate your signature.

### Hitting the Wrong URL

For the Rest API you must call the correct url of the environment you're running jobs in. The Smile ID Mobile SDKs & Server-Side Libraries handle the right url to call based on environment variable you set. The base urls for production and sandbox are as follows:

| Environment | Base URL                             |
| ----------- | ------------------------------------ |
| Sandbox     | <https://testapi.smileidentity.com/> |
| Production  | <https://api.smileidentity.com/>     |


---

# 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://legacy-docs.usesmileid.com/further-reading/troubleshooting/troubleshooting-error-2204-and-2205-youre-not-authorized-to-do-that.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.
