Change the user's password

POST /api/change-password

Request

Body

Pass the following properties via application/json or form encoding in the body of the request.

A dictionary with fields

Field Type Description
grant_type String String. Should be equal to 'password'
client_id ApiClient String value. The client_id of the application that is making the request. Each application has it's own unique client_id that can be obtained on request.
device_name String Name of the device. E.g. the machine's hostname.
device_id String Some unique id found in the device. If you don't find a unique UUID in the device you can create one yourself and store it somewhere to be reused. There can only be one access_token and refresh_token for every user + device_id + client_id combination. The amount of access tokens for the same user and client id is limited. Creating too many access tokens will invalidate older tokens.
username Email Email address
password String A String value
new_password Password Password field

Example request 1

POST /api/change-password HTTP/1.1
Host: accounts.bakeronline.be
X-VERSION: 0.3.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 327
{
    "grant_type": "password",
    "client_id": "264ade60a4ca76716a53056cecb171c027586dc722d6cf5ba40b1519de78170910d9ce0602c776f9",
    "device_name": "Simon's iPhone",
    "device_id": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9fdgs",
    "username": "example@domain.com",
    "password": "...",
    "new_password": "password123"
}

Response

Field Type Description
access_token String Hexadecimal string with a maximum length of 256 characters
token_type String String. Should be equal to 'Bearer'
expires_in Int Time in seconds before the token expires
refresh_token String Hexadecimal string with a maximum length of 256 characters

Example response 1

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 1495

{
    "access_token": "ec4ad8b4eb6e32d41cc1b2a76d1f3c9b8b0e5bc52cccf95a32b25d8c485a963270e21c5f0bcc31e8919b66c4de84b7ef0541584734d1e32de5376103cff157b9\n            bfdfe1250389ada3acb5acf6713036c46aacef14fa624d1fb342e6c88bae58bf62c58a75346bad31bd3632e5ee69955e7c0bddaa782c5c50a53350b25e472501\n            eb25ddb1db38022f122209b9b7d9e0d4e77d90f8b957cd94153332e4e50ba22fba435e0a099b43e7b7a76169af502cc450761fd07cdfdeda433b3ef531d5ebec\n            4982ed103cb4c7903c1794dda58af603e2e5c47582568e5f4c191618f112fad6325f6fe7aaa90b3dd3c5b0168f5dc8a4fbb2d818b2e07db9fe2e1123fc335ed8\n            9cdb6345684d7e65217d22adaafc0f6dd8887720478efcfa8d57504742715011195a6b9a8022b17f603edf7b29a282bdba18026853419b08e1967b101e040b6d",
    "token_type": "Bearer",
    "expires_in": 3600,
    "refresh_token": "ec4ad8b4eb6e32d41cc1b2a76d1f3c9b8b0e5bc52cccf95a32b25d8c485a963270e21c5f0bcc31e8919b66c4de84b7ef0541584734d1e32de5376103cff157b9\n            bfdfe1250389ada3acb5acf6713036c46aacef14fa624d1fb342e6c88bae58bf62c58a75346bad31bd3632e5ee69955e7c0bddaa782c5c50a53350b25e472501\n            eb25ddb1db38022f122209b9b7d9e0d4e77d90f8b957cd94153332e4e50ba22fba435e0a099b43e7b7a76169af502cc450761fd07cdfdeda433b3ef531d5ebec\n            4982ed103cb4c7903c1794dda58af603e2e5c47582568e5f4c191618f112fad6325f6fe7aaa90b3dd3c5b0168f5dc8a4fbb2d818b2e07db9fe2e1123fc335ed8\n            9cdb6345684d7e65217d22adaafc0f6dd8887720478efcfa8d57504742715011195a6b9a8022b17f603edf7b29a282bdba18026853419b08e1967b101e040b6d"
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
0.3.0 stable