Rest API remove user from group

In order to reduce our number of licensed users I try to remove users from one ouf our application access groups who have not logged in to Jira for the last 6 month.
The following curl returns an error:
curl -D- -k -X DELETE -H “Authorization: Basic myBase64String” jira base URL/jira/rest/api/2/group/user?groupname=jira-users-intern&username=my username

HTTP/1.1 400
Date: Fri, 18 Mar 2022 18:25:08 GMT
Server: Apache/2.4.39 (Unix) OpenSSL/1.0.2k-fips
X-AREQUESTID: 1165x51960x1
Referrer-Policy: strict-origin-when-cross-origin
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: sandbox
Strict-Transport-Security: max-age=31536000
X-Seraph-LoginReason: OK
Cache-Control: no-cache, no-store, no-transform
Content-Type: application/json;charset=UTF-8
Set-Cookie: JSESSIONID=03407E46DB2979763A8BF3E376BAF549; Path=/jira; HttpOnly
Set-Cookie: atlassian.xsrf.token=BB83-7N7W-K7L4-Q4JS_bb1c8bd1c6fe2967f89fcb81a730b3e1397a2e36_lin; Path=/jira
Connection: close
Transfer-Encoding: chunked

{“errorMessages”:[“Cannot remove user. ‘null’ does not exist”],“errors”:{}}

When I perform the same task in Jira rest api browser everything works fine.

Any idea what’s going wrong.

It took me all day long and directly after posting my question I found the error myself:

curl -D- -k -X DELETE -H “Authorization: Basic myBase64String” jira base URL/jira/rest/api/2/group/user?groupname=“jira-users-intern&username=my username”

I missed the quotes for the variables.