Change User's Password/Email
A user's password and/or email can be changed with a PUT
request to /api/users/{userId}
. In order to update a user's password and/or email, the current password/email should be provided.
Request
Key | Description |
---|---|
| The user's current password. |
| The password to which the user's password should be changed to. |
| The user's current email. |
| The email to which the user's email should be changed to. |
//change a user's password and/or email
PUT /api/users/c1e60c6b-a0a4-4d80-81eb-c1c6de729a0e HTTP/1.1
Host: user.gini.net
Authorization: BEARER 74c1e7fe-e464-451f-a6eb-8f0998c46ff6
Content-Type: application/json
//with
{"oldPassword":"supersecret","password:"anothersecret"}
//or
{"oldEmail":"old@email.com","email:"my.new@email.com"}
//or
{
"oldPassword":"supersecret",
"password":"anothersecret",
"oldEmail":"old@email.com",
"email":"my.new@email.com"}
Â