Hi Daan, The API keys currently used are from the admin user. I assume admin user is able to create accounts via API, as I am able to do it in the panel manually using the admin user.
Thanks, JeanPaul ________________________________ From: Daan Hoogland <daan.hoogl...@gmail.com> Sent: Friday, July 14, 2023 10:26 AM To: users@cloudstack.apache.org <users@cloudstack.apache.org> Subject: Re: API questions first thought JeanPaul, Is the user with these credentials (apikey/secretkey) allowed to execute creatUser? On Fri, Jul 14, 2023 at 10:13 AM JeanPaul van der Mijle < jp.vandermi...@hyperai.ai> wrote: > Hi all, > > I am trying to create accounts using the API. However, upon sending the > request, I always get the error back about "invalid credentials or > signature". > > My code is as follows: > > $command['command'] = "createUser"; > $command['account'] = $username; > $command['email'] = $email; > $command['firstname'] = $firstname; > $command['lastname'] = $lastname; > $command['password'] = $password; > $command['username'] = $username; > ksort($command); > > $command['signature'] = $this->sign(http_build_query($command)); > $command['apikey'] = $this->apikey; > $command['response'] = "json"; > > $link = $this->baseurl . http_build_query($command); > $result = $this->call_api($link); > var_dump($command); > var_dump($result); > > I am using the same commands and order for other commands, but there it > works fine (listUsers, listServiceOfferings etc, with additional options as > well), however attempting to create accounts fails. Is this a known bug or > am I do something wrong with the order for signing? > > Thank you. > > JeanPaul > -- Daan