Appearance
Change password
Changes the signed-in user's password. The user is taken from the bearer token.
POST /fieldservicegateway/usermanagement/v3/auth/password-change
Request
| Field | Type | Required | Description |
|---|---|---|---|
current_password | string | yes | Password the user has now. 1–72 characters |
new_password | string | yes | 10–72 characters, with an uppercase letter, a lowercase letter, a digit, and a symbol. No spaces |
Example
json
{
"current_password": "Current-Pass1!",
"new_password": "New-Passw0rd!"
}cURL
bash
curl --request POST 'https://[BASE_URL]/fieldservicegateway/usermanagement/v3/auth/password-change' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{x-api-key}}' \
--header 'Authorization: {{Authorization}}' \
--header 'Asurion-correlationid: correlation-id' \
--header 'Asurion-enduser: end-user' \
--header 'Asurion-sourcesystem: source-system' \
--header 'Asurion-serviceprovider: company-id' \
--header 'Asurion-client: default' \
--data '{
"current_password": "Current-Pass1!",
"new_password": "New-Passw0rd!"
}'Response
200 OK
json
{
"success": true,
"message": "Password changed successfully"
}Errors
| Status | Code | When |
|---|---|---|
| 400 | VALIDATION_ERROR | A password is missing, or the new password does not meet the rules |
| 400 | SSO_ONLY_ACCOUNT | Password change is not available for a single sign-on account |
| 401 | The bearer token is missing or invalid | |
| 404 | NOT_FOUND | No identity was found for the signed-in user |
| 500 | INTERNAL_ERROR | Something unexpected failed, including a current password that does not match |