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!
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!