# API key configuration: 'Unauthorized: Token was not accepted.'

**URL:** https://community.fireblocks.com/t/api-key-configuration-unauthorized-token-was-not-accepted/463
**Category:** Support
**Created:** [November 6, 2023, 2:57pm UTC](https://community.fireblocks.com/t/api-key-configuration-unauthorized-token-was-not-accepted/463 "2023-11-06T14:57:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Nariosman](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@Nariosman](https://community.fireblocks.com/u/Nariosman)
#### Post date: [November 6, 2023, 2:57pm UTC](https://community.fireblocks.com/t/api-key-configuration-unauthorized-token-was-not-accepted/463/1 "2023-11-06T14:57:48Z")

</div>

Hi team,

We are trying to configure the API Key that is generated from an API user for a sandbox workspace however we are getting an error.

API request with the API key + private key combination for the API user on the workspace, we are getting ‘Unauthorized: Token was not accepted.’

Can you please advise if the setup may be different for sandbox, or perhaps the API user needs to be setup with specific configurations?

---

<div class="post-metadata">

### Author: ![alinder](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@alinder](https://community.fireblocks.com/u/alinder)
#### Post date: [November 7, 2023, 7:47am UTC](https://community.fireblocks.com/t/api-key-configuration-unauthorized-token-was-not-accepted/463/2 "2023-11-07T07:47:53Z")

</div>

Hey,  
check that you set the intended environment at the client you are using.

> **[Postman Guide](https://developers.fireblocks.com/docs/postman-guide)**
>
> Prerequisites IntroductionQuickstart Guide or Developer Sandbox Quickstart OverviewPostman is an application designed to help with API integration and exploration. Intuitive for different tech skill levels, this is the tool of choice both for...

1. `baseUrl`: This should be set to either of the following, depending on the environment you are using: `https://api.fireblocks.io/v1` for mainnet and testnet or `https://sandbox-api.fireblocks.io/v1` for developer sandbox environments.

---

<div class="post-metadata">

### Author: ![Nariosman](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@Nariosman](https://community.fireblocks.com/u/Nariosman)
#### Post date: [November 7, 2023, 2:43pm UTC](https://community.fireblocks.com/t/api-key-configuration-unauthorized-token-was-not-accepted/463/3 "2023-11-07T14:43:55Z")

</div>

@alinder Thank you very much, that was it!
