# Post api registration user

**URL:** <https://discourse.getcockpit.com/t/post-api-registration-user/866>\
**Category:** Support\
**Created:** [June 12, 2019, 1:54pm UTC](https://discourse.getcockpit.com/t/post-api-registration-user/866 "2019-06-12T13:54:14Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)\
**Post date:** [June 17, 2019, 11:46am UTC](https://discourse.getcockpit.com/t/post-api-registration-user/866/2 "2019-06-17T11:46:16Z")

</div>

You have to send `user` as an array. So `/api/public/signup?user[user]=username&user[email]=...` should work.

See also: [https://github.com/agentejo/cockpit/blob/next/modules/Cockpit/Controller/RestApi.php#L65](https://github.com/agentejo/cockpit/blob/next/modules/Cockpit/Controller/RestApi.php#L65)

And you shouldn’t send passwords as get parameters. They might pop up in log files, browser histories or analytics data.

And please provide some more info when asking for help. I had to read your previous post to understand, what you are doing.

> [@Get Api authorization Token](https://discourse.getcockpit.com/t/get-api-authorization-token/865):
>
> how through api will get an auth token? [Domain.com/api/cockpit/auth?user=username&password=mypassword](http://Domain.com/api/cockpit/auth?user=username&password=mypassword) response: “token”:“xxxxxxxxTokenxxxxx”

---

_[View the full topic](https://discourse.getcockpit.com/t/post-api-registration-user/866)._
