Hi Alberto,
To use the signature validation on your APIs , please make sure you are following the correct path as given below:
1. Signature & Timestamp Validation is only for POST requests.
2. Make sure you have you have attached the API operation to the IAM in IAM Mappings.
3. Make sure you have attached the API operation to Auth Policy in API Settings.
4. Initialize the variables as shown below.
String apiName = "HelloWorld"; // This is your Operation Name (not api name).
String version = "1.0"; // project version
String body = "{\"singer\": \"Metallica\",\"title\": \"Enter Sandman\"}"; // exact Body
String signature = generateSignature(apiName,version,IAM_Key,IAM_Secret_KEY,body);
System.out.println("Signature: "+signature);
4. When Requesting from test api and view specs , please make sure you are passing the body same as you have passed while generating the signature.
5. The signature and timestamp generated will be valid for the mentioned timestamp period which you have given in the auth policy.
Follow these steps and all will be good.
Please let us know if you are still facing any issues. We ll be happy to help you.
Thanks & Regards,
Ashutosh