r/ApacheCloudStack • u/waiphyodev • Jul 03 '25
Question createUser rest api error
My cloudstack api url for create user is like http://cloudstack-host/client/api?account=<account>&command=createUser&email=userthree%40mail.com&firstname=User&lastname=Three&password=password&response=json&username=userthree&signature=<signature>
It rejects me with 401 It is happening only in createUser and createAccount APIs If someone know what is happening here, I really appreciate for your help
1
Upvotes
View all comments
Show parent comment
1
u/waiphyodev Jul 04 '25
Yes, I do the same process via CloudStack dashboard with the same account and it is fine.
This is happening only via API. Also in createAccount too
GET (401 error)
http://host/client/api?apikey=<api-key>&command=createAccount&domainid=<domain-id>&email=userthree%40mail.com&firstname=User&lastname=Three&password=password&response=json&roleid=<role-id>&username=userthree&signature=<signature>POST (431 error)
http://host/client/api?apikey=<api-key>&command=createAccount&response=json&signature=<signature>with payload
{ email: 'userthree@mail.com', firstname: 'User', lastname: 'Three', username: 'userthree', password: 'password', roleid: 'role-id', domainid: 'domain-id' }