# Getting error of 401 (Unauthorized: Token was not accepted.)

**URL:** <https://community.fireblocks.com/t/getting-error-of-401-unauthorized-token-was-not-accepted/1058>\
**Category:** Support\
**Tags:** help-center, getting-started\
**Created:** [May 23, 2024, 7:57am UTC](https://community.fireblocks.com/t/getting-error-of-401-unauthorized-token-was-not-accepted/1058 "2024-05-23T07:57:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarthak.saxena](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@sarthak.saxena](https://community.fireblocks.com/u/sarthak.saxena)\
**Post date:** [May 23, 2024, 7:57am UTC](https://community.fireblocks.com/t/getting-error-of-401-unauthorized-token-was-not-accepted/1058/1 "2024-05-23T07:57:51Z")

</div>

getting axios error  
data: { message: ‘Unauthorized: Token was not accepted.’, code: -7 }  
while creating Vault using createVaultAccount function  
Even after passing the secret key and api-key

 ![image](https://us1.discourse-cdn.com/flex015/uploads/fireblocks/original/1X/1f3cb7b5f05cc5beb767f1c9c4112827f9978c49.png)

---

<div class="post-metadata">

**Author:** ![SlavaSereb](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@SlavaSereb](https://community.fireblocks.com/u/SlavaSereb)\
**Post date:** [May 23, 2024, 10:38am UTC](https://community.fireblocks.com/t/getting-error-of-401-unauthorized-token-was-not-accepted/1058/2 "2024-05-23T10:38:07Z")

</div>

Hey @sarthak.saxena,

Can you please share the first 5 chars of the API Key that you’re using?

---

<div class="post-metadata">

**Author:** ![sarthak.saxena](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@sarthak.saxena](https://community.fireblocks.com/u/sarthak.saxena)\
**Post date:** [May 23, 2024, 10:45am UTC](https://community.fireblocks.com/t/getting-error-of-401-unauthorized-token-was-not-accepted/1058/3 "2024-05-23T10:45:11Z")

</div>

Hey @SlavaSereb  
Here is the first 5 CHAR of API Key

ada34

---

<div class="post-metadata">

**Author:** ![SlavaSereb](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@SlavaSereb](https://community.fireblocks.com/u/SlavaSereb)\
**Post date:** [May 23, 2024, 2:11pm UTC](https://community.fireblocks.com/t/getting-error-of-401-unauthorized-token-was-not-accepted/1058/4 "2024-05-23T14:11:49Z")

</div>

> [@sarthak.saxena](#):
>
> ada34

Seems that an API key that starts with these chars does not exist in your Sandbox workspace.

Can you please make sure that you’re copy pasting the correct API key from the Fireblocks Web console?
