I get { "message": "Unauthorized: Hash is incorrect.", "code": -9 }

Hello everyone, I am new to Fireblocks and try to run the different API provided by Fireblocks using the postman collections provided.
I am abel to create vault account and add wallet account to vault using the API key and Secret key. But when I am trying to send a transaction I am getting this error.
“message”: “Unauthorized: Hash is incorrect.”,
“code”: -9

I am also getting the Unauthorized: JWT is missing while fetching the vault accounts apged API

Hello I am Mohammed from Fireblocks Support, this error could be related to how you Hex-encoded the SHA-256 hash of the raw HTTP request body.

The payload field should contain the following fields:

  • uri - The URI part of the request (e.g., /v1/transactions).
  • nonce - Unique number or string. Each API request needs to have a different nonce.
  • iat - The time at which the JWT was issued, in seconds since Epoch.
  • exp - The expiration time on and after which the JWT must not be accepted for processing, in seconds since Epoch. (Must be less than iat+30sec.)
  • sub - The API Key.
  • bodyHash - Hex-encoded SHA-256 hash of the raw HTTP request body.

More can be seen here in our developer docs that go over JWT structure, Signing a Request (JWT Structure)

For all the other details provided, I understood the concept and how it can be achieved but did not understand the last statmenent in the doc which was mentioned as
The JWT must be signed with the Fireblocks API secret key and the RS256 (RSASSA-PKCS1-v1_5 using SHA-256 hash) algorithm.