Invalid Signature : String to sign
I am using next js to develop my project. below is the code written at route.ts, I stuck on this issue more than a week. Please someone advise what exactly going wrong on below lines of code.
I spent a lot of time to resolve this issue. youtube tutorials, chatGPT doesnot solve my issue. Please point out where is the problem exactly.
Answers
-
Hi @binaya ,
From the code, I see that the signature is created based on the timestamp only, but it is missing thepublic_id
parameter as well.
The signature should be generated by using all the upload parameters including the 'timestamp' parameter but excluding the 'api_key', 'resource_type', 'cloud_name', and 'file' parameters, based on your product environment's API secret. The signature is valid for 1 hour.
You can read more about it in the following articles:
Best Regards,
Wissam
1