# API for setting username and password for account

**URL:** <https://forums.suse.com/t/api-for-setting-username-and-password-for-account/8362>\
**Category:** General\
**Created:** [January 27, 2018, 11:06am UTC](https://forums.suse.com/t/api-for-setting-username-and-password-for-account/8362 "2018-01-27T11:06:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ranjith](https://avatars.discourse-cdn.com/v4/letter/r/8797f3/32.png) [@ranjith](https://forums.suse.com/u/ranjith)\
**Post date:** [January 27, 2018, 11:06am UTC](https://forums.suse.com/t/api-for-setting-username-and-password-for-account/8362/1 "2018-01-27T11:06:59Z")

</div>

I have created account in my current rancher setup. I need to set username and password for that account using REST API. I couldn’t find it in the API documentation. What is the url or link for creating username and password.

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [January 30, 2018, 8:28am UTC](https://forums.suse.com/t/api-for-setting-username-and-password-for-account/8362/2 "2018-01-30T08:28:41Z")

</div>

> [@How to create a user in rancher api?](http://forums.suse.com/t/how-to-create-a-user-in-rancher-api/2888/2):
>
> It’s two separate requests, one to create the account and another to assign the password. In the response to the first one (what you have is fine) you’ll get the account id, then curl -X POST ... \ -d '{"publicValue":"yourusername","secretValue":"yourpassword","accountId":"1a114"}' \ http://192.168.54.207/v1/password

p.s. our bad for not reserving it but please change your username to something that doesn’t clearly suggest you are or speak for our company (or I eventually will for you).
