I'm getting an axios 401 error


const apiSecret = fs.readFileSync(path.resolve("./path_to_key"), "utf8");
// Choose the right api url for your workspace type 
const baseUrl = "https://sandbox-api.fireblocks.io";

const fs = require('fs');
const path = require('path');
const { FireblocksSDK } = require('fireblocks-sdk');
const { exit } = require('process');
const { inspect } = require('util');

const apiKey = "api_key"
// Choose the right api url for your workspace type 
const fireblocks = new FireblocksSDK(apiSecret, apiKey, baseUrl);

(async () => {

    // Print vaults before creation
    let vaultAccounts = await fireblocks.getVaultAccountsWithPageInfo({});
    console.log(inspect(vaultAccounts, false, null, true));

    // Create vault account
    const vaultCreation = await fireblocks.createVaultAccount("QuickStart_Vault");
    console.log(inspect(vaultCreation, false, null, true));

    // Print vaults after creation
    vaultAccounts = await fireblocks.getVaultAccountsWithPageInfo({});
    console.log(inspect(vaultAccounts, false, null, true));

})().catch((e)=>{
    console.error(`Failed: ${e}`);
    exit(-1);
})

Using the above code all I get is axios 401 error

Hi @david

Alec from Fireblocks Support here. Could you please share your workspace name and the first 4 digits of the API key you are using so I can take a closer look?

My workspace is
Unwrittn - David Wong

I’m trying with these 3 api keys:

cedb6
26ca
a8ff

Hi @alec,

any updates?