Signature Invalid
It is an API error returned when the provided signature parameter is not valid. It is also returned when a signed request is sent as POST, because signed requests are only accepted as GET.
{ "is_successful": false, "error_code": "signature_is_not_valid", "error_message": "You provided the `signature` parameter, but it is not valid. Make sure you use the correct signing algorithm—https://screenshotone.com/docs/signed-requests/.", "documentation_url": "https://screenshotone.com/docs/errors/signature-is-invalid/"}Reasons and how to fix
Section titled “Reasons and how to fix”Incorrect Signing Algorithm
Section titled “Incorrect Signing Algorithm”The most common reason for the “signature_is_not_valid” error is using an incorrect signing algorithm to generate the signature.
To fix this, you can:
- Verify signing algorithm: Ensure you are using the correct signing algorithm as specified in the signed requests documentation.
- Check signature generation code: Review your code that generates the signature to ensure it follows the correct algorithm and procedure.
Mismatched Signature
Section titled “Mismatched Signature”The signature provided in the request might not match the expected signature due to data mismatches or incorrect key usage.
To fix this, consider:
- Verify request data: Ensure that all data used to generate the signature matches the data sent in the request.
- Use correct secret key: Ensure that the correct secret key is used to generate the signature.
Signature Formatting Issues
Section titled “Signature Formatting Issues”Formatting issues, such as encoding problems or extra characters, can lead to an invalid signature.
To fix this, verify that the signature is correctly formatted and encoded as required by the API.
Signed Request Sent as POST
Section titled “Signed Request Sent as POST”The signature covers only the query string, not a POST request body, so signed requests are only accepted as GET. A POST request is rejected with this error when it carries a signature, or when its access key requires signing:
{ "is_successful": false, "error_code": "signature_is_not_valid", "error_message": "signed requests are only accepted as GET: the signature doesn't cover a POST body", "documentation_url": "https://screenshotone.com/docs/errors/signature-is-invalid/"}To fix this, send the signed request as GET with all options in the query string. If you need POST requests, use an access key that doesn’t require signing and send the request without a signature.
Debugging Signature Issues
Section titled “Debugging Signature Issues”If you are still encountering issues, you can use debugging tools or logging to trace the signature generation process and identify where it might be going wrong.
Reach out to support
Section titled “Reach out to support”If you continue to face issues or need further assistance, please reach out to support@screenshotone.com, and we will assist you as soon as possible.