getUserIdForPasswordSet


SoftLayer_User_Customer_OpenIdConnect::getUserIdForPasswordSet

Retrieve a user id using a password request key

Description

Retrieve a user id using a password token provided to the user in an email generated by the SoftLayer_User_Customer::initiatePortalPasswordChange request. Password recovery keys are valid for 24 hours after they’re generated.

When a new user is created or when a user has requested a password change using initiatePortalPasswordChange, they will have received an email that contains a url with a token. That token is used as the parameter for getUserIdForPasswordSet. Once the user id is known, then the SoftLayer_User_Customer object can be retrieved which is necessary to complete the process to set or reset a user’s password.


Parameters

Name Type Description
key string A password recovery hash key retrieved from an email.

Required Headers

Optional Headers

  • None

Return Values

  • int

Error Handling

  • Throws the exception “Invalid password recovery key” if no password recovery key was provided, the provided key was invalid, the key has expired, or the recovery key does not belong to this user.

Associated Methods

curl -g -u $SL_USER:$SL_APIKEY -X POST -d '{"parameters": [string]}' \
'https://api.softlayer.com/rest/v3.1/SoftLayer_User_Customer_OpenIdConnect/getUserIdForPasswordSet'