401 "unable to verify user credentials and/or request signature" when calling deleteAutoScaleVmGroup #13651
Replies: 2 comments
-
|
Using the same API key and secret key, can you test calling this API with CloudMonkey (https://github.com/apache/cloudstack-cloudmonkey)? |
Beta Was this translation helpful? Give feedback.
-
|
Interesting one. Since the same signer works for listAutoScaleVmGroups, the signing implementation itself is fine, so this smells more like something specific to how deleteAutoScaleVmGroup builds its parameter set. A few things worth checking: Extra params on delete you might not be signing. Some CloudStack delete-type APIs (and definitely some SDKs/wrappers) silently attach extra params like cleanup or forced on delete calls but they don't always get included in both the request AND the signature string consistently. Double check exactly which params are going into the HMAC vs what's on the wire, they need to be identical. If you can post the exact param string you're signing (redact the actual id/keys) for both a working call and the failing delete call side by side, that diff usually makes it obvious immediately. We've built custom API clients against CloudStack here at AccuWeb.Cloud and 9 times out of 10 this exact symptom traces back to one extra or missing param between the signed string and the sent request, so it's worth logging both strings and diffing them byte for byte. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Environment
signing)
Problem
I am able to successfully call several CloudStack APIs using the same
API key, secret key, and signing implementation. For example:
listAutoScaleVmGroups✅However, when I call
deleteAutoScaleVmGroup, CloudStack consistentlyreturns the following response:
{ "success": false, "message": "unable to verify user credentials and/or request signature", "errors": { "errorresponse": { "errorcode": 401, "errortext": "unable to verify user credentials and/or request signature" } } }What I have verified
listAutoScaleVmGroups.idparameter is being passed correctly from the application.Delete Request
The request is sent using:
The request is signed using the same helper method that successfully
signs other CloudStack API requests.
Expected Behavior
The AutoScale VM Group should either be deleted successfully or return
an error related to the resource (if applicable), instead of failing
during signature verification.
Actual Behavior
CloudStack returns:
even though the same credentials and signing implementation work for
other API commands.
Any guidance would be greatly appreciated. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions