GitHub user bipasaroy10 created a discussion: 401 "unable to verify user 
credentials and/or request signature" when calling deleteAutoScaleVmGroup


## Environment

-   **CloudStack Version:** 4.22
-   **API Response Format:** JSON
-   **Client:** Node.js (custom API client using HMAC-SHA1 request
    signing)

## Problem

I am able to successfully call several CloudStack APIs using the same
API key, secret key, and signing implementation. For example:

-   `listAutoScaleVmGroups` ✅
-   Other read APIs ✅

However, when I call `deleteAutoScaleVmGroup`, CloudStack consistently
returns the following response:

``` json
{
  "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

-   The API key and secret key are correct.
-   The same signing logic works for other CloudStack APIs.
-   The request is signed immediately before being sent.
-   The AutoScale VM Group ID exists and was obtained using
    `listAutoScaleVmGroups`.
-   The `id` parameter is being passed correctly from the application.

## Delete Request

The request is sent using:

``` text
command=deleteAutoScaleVmGroup
id=<autoscale_vm_group_id>
response=json
```

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:

``` text
401 - unable to verify user credentials and/or request signature
```

even though the same credentials and signing implementation work for
other API commands.



Any guidance would be greatly appreciated. Thank you!


GitHub link: https://github.com/apache/cloudstack/discussions/13651

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to