Consume ChangePassword via okta sdk

Hi There,

We are trying to consume okta’s change password api via okta sdk in java but facing change in forming the request.

Could you please provide a sample how we can for ChangePasswordRequest.

Thank you.

Hi @luckyprashant,

If you’re using okta java sdk version 1.x,
you can use the following code template to change password -

UserCredentials credentials = user.changePassword(client.instantiate(ChangePasswordRequest)

Test code in groovy can be found here