Issue description
This error code typically indicates the API user initiating this request does not have access to the requested operation based on their user role.
Fireblocks API body response
{"message":"Unauthorized: Insufficient permissions.","code":-8}
Python SDK error message
fireblocks_sdk.api_types.FireblocksApiException: Got an error from fireblocks server: "message":"Unauthorized: Insufficient permissions.","code":-8}
JavaScript SDK error response
response: {
status: 401,
statusText: 'Unauthorized',
headers: {
server: 'nginx',
date: 'Tue, 28 Feb 2023 20:13:38 GMT',
'content-type': 'application/octet-stream',
'content-length': '63',
connection: 'close'
},
config: <REMOVED_CONFIG_DATA>,
request: <REMOVED_REQUEST_DATA>,
data: { message: 'Unauthorized: Insufficient permissions.', code: -8 }
}
Resolution
To ensure the user has the proper permissions for the endpoint, compare the API user's role with the action being performed in the User Roles table.