You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
401 error in cloudstack createUser rest api #11130
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
@waiphyodev , I suppose you left out the signature on purpose and did include it in your attempts to create a user.
there is “account” between the URL and the rest of the parameters,
my try looks like
Thanks for reply.
Yes, it does have required permissions to do request because I do the same process via CloudStack dashboard with the same account and it is fine.
This is happening only via API.
What if I'm calling with API key, how should I give payload in which method.
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>
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>
Activity
boring-cyborg commentedon Jul 3, 2025
Thanks for opening your first issue here! Be sure to follow the issue template!
DaanHoogland commentedon Jul 3, 2025
@waiphyodev , I suppose you left out the signature on purpose and did include it in your attempts to create a user.
there is “account” between the URL and the rest of the parameters,
my try looks like
and is a post request with parameters.
if this seems ok,
Have a look at the rights of the executing user, Do they have rights to this API.
waiphyodev commentedon Jul 4, 2025
Thanks for reply.
Yes, it does have required permissions to do request because I do the same process via CloudStack dashboard with the same account and it is fine.
This is happening only via API.
What if I'm calling with API key, how should I give payload in which method.
waiphyodev commentedon Jul 4, 2025
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: '902f63f7-3235-11f0-8e75-2a84a8b381fa', domainid: '60afa7af-3235-11f0-8e75-2a84a8b381fa' }weizhouapache commentedon Jul 4, 2025
sessionkeyis needed i think