-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provided signature is invalid for PATCH request #110
Comments
After dealing with this for hours I realized the URL you use to generate the signature should include all the parameters you are posting |
Here's an example in PHP: $data = [ $data_encoded = http_build_query($data); $endpoint_base = '/public/api/ver1/bots/12345678/update'; $signature = hash_hmac('sha256', $endpoint, $secret); $headers = array( $curl = curl_init($url); |
I am stuck with the same problem. @agustind how did you manage to send the strategy_list parameter? Because if you don't want to update it, you need to provide it as it is in the bot before updating no ? Does it get encoded properly? because it's a json array not a simple type. |
i'm facing an issue sending API Patch request, it always send a "{"error":"signature_invalid","error_description":"Provided signature is invalid"}" error, when i try to send i GET request, it return s successfully.
but the issue happens when trying to send PATCH request with several parametes in the body using cURL "-d xxxxxx", it always send me 401 unauthorized, so i need to know do i need to put the baseURL only "/public/api/ver1/bots/<bot_id>/update" in "Plain Text to Compute Hash" or shall i add the parameters in the body also to the "Plain Text to Compute Hash"
The text was updated successfully, but these errors were encountered: