Change password api error

Anyone has successfully change end user pw with okta api?
curl -v -X POST
-H “Accept: application/json”
-H “Content-Type: application/json”
-H “Authorization: SSWS ${api_token}”
-d ‘{
“oldPassword”: { “value”: “tlpWENT2m” },
“newPassword”: { “value”: “uTVM,TPw55” }
}’ “https://${yourOktaDomain}/api/v1/users/00ub0oNGTSWTBKOLGLNR/credentials/change_password”

I always got error:
{“errorCode”:“E0000003”,“errorSummary”:“The request body was not well-formed.”,“errorLink”:“E0000003”,“errorId”:“oaeH8Vl4HrPTGyBNmkBu95iJQ”,“errorCauses”:}
Any idea? Thanks a lot!

I could finally make above works with “curl” but still could not do with postman. I always got “400 Bad Request”. Probably it’s caused by setting wrong “Authorization” type with “API Key”? Any help will be appreciated!

hey @leonking! Try adding the SSWS as a header instead - I think that should do the trick.

1 Like


I tried to move “Authorization” to header like you suggested and got error different now:

It works now. Thanks! @tyty
One quick question: how to link from code to the change password page like “okta-dev-99984526](Sign In” or is there any better way for this? Thanks!