Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added scope
Tip
titleBefore you begin...

To consume the APIs listed in this page, follow the steps in the Getting Started guide and get the OAuth bearer token with the apim:subscribe scope.

Table of Contents
maxLevel3
minLevel2
printablefalse

...

Localtabgroup
Localtab
activetrue
titleRequest
HTTP Request methodPOST
URLhttps://gateway.api.cloud.wso2.com/api/am/user/subscriber/reset-password/initiate
Headers

Content-Type: application/json
Authorization: Bearer <Bearer token received by following prerequisites>

Payload
Code Block
{
	"email":"sam@wso2.com",
	"callbackURL": "http://myapp.com/reset-password"
}
ParameterDescription
emailThe registration email of the user you need to reset the password of.
callbackURL

The URL the user is redirected to once they receive the email to reset the password. Two parameters will be appended with the callback URL which are needed to make the next request. You do not need to append this as it will auto get appended to the URL provided above. You need to extract those two parameters and send it in the request 2.

If a callback URL is not specified then the redirection would be the default redirection to the wso2 cloud reset password page.

An example of such a custom callback URL returned to the user is shown below
http://myapp.com/reset-password?id=sam@wso2.com&confirmation=14f6b1dc-75b7-472c-8a1f-11455f669dbd

ParameterDescription
idThe email of the user
confirmationCodeThe confirmation code which is returned for the password reset to be passed to the request 2
Note

Follow Step 2 and 3 after you are re-directed.

Localtab
titleResponse
Code Block
titleSuccessful invocation
{
	"success":true,
	"message":"Successfully added the user to the tenant testrest"
}

Code Block
titleUnsuccessful invocation (Invalid security token)
{
    "success":false,"
    message":"Unable to retrieve user information. Invalid confirmation key provided. Please check the confirmation key and try again"
}

...