code
async createApiUser(){
const projectRoot = join(__dirname, ‘..’);
const secretKeyPath = join(projectRoot, ‘src’, ‘fireblocks_secret.key’);
try {
const data = await this.fireblocks.apiUser.createApiUser({
createAPIUser:{
name:“api user Rishikesh Singh”,
role:“admin”,
csrPem:process.env.API_SECERETE_KEY||“”
},
idempotencyKey: randomUUID(),
})
console.log(“New Internal Wallet Created”, JSON.stringify(data, null, 2))
} catch (error) {
console.log(error)
}
}
error message
message: ‘Unauthorized: Token was not accepted.’,
response: FireblocksResponse {
data: { message: ‘Unauthorized: Token was not accepted.’, code: -7 },
statusCode: 401,
headers: {
date: ‘Wed, 23 Apr 2025 14:01:23 GMT’,
‘content-type’: ‘application/json; charset=utf-8’,
‘content-length’: ‘61’,
connection: ‘keep-alive’,
‘x-powered-by’: ‘Express’,
‘x-request-id’: ‘72dadeaac76e095560cf4b89d9848670’,
‘x-reason’: ‘{“message”:“Unauthorized: Token was not accepted.”,“code”:-7}’,
etag: ‘W/“3d-zomXnAy0H/hxycUcfr0PgHC7HLw”’,
‘strict-transport-security’: ‘max-age=31536000; includeSubDomains’,
‘cf-cache-status’: ‘DYNAMIC’,
server: ‘cloudflare’,
‘cf-ray’: ‘934de47feb76c995-IAD’
}
},
first four keys of api key → baa4
please let me know what am i ding wrong??