API REFERENCE GUIDE

user subscription  password_reset

api description

purpose

password_reset sends a new password and a confirmation link to a subscriber email address. The process is similar to subscribe but for existing users.

http method: POST

call cost: 1 point

See the pricing section for more details.

mandatory parameter(s)

parameter values / comments
api"password_reset"
key E.g. "c54e7837e0cd0ced286cb5995327d1ab54e35987179b2". It is an application key generated by AuverCloud Studio.
emailSubscriber email address.
tokenToken ID generated by challenge_new.
challengeUser input as answer to the visual challenge.
subjectSubscription email subject e.g. "Please confirm your password reset."
contentSubscription email HTML content e.g. "To confirm your password reset for the service XYZ, please click the following <a href='%link%'>link</a>. Then your new password will be %password%."

PLEASE NOTE: In the example below few keywords are important!

  • %link% will be replaced by a link dynamically computed by the API. See also callback in the optional parameters.
  • %password% will be replaced by a password generated by the API server.

optional parameters(s)

parameter values / comments
callbackThis is the callback URL for the confirmation. The default value is the API server "".

We suggest you to replace this default address with a customized one in order to provide the end user with some personalized feedback. In that case, your customized address must intercept the parameters and then forward them to the API server in a transparent way.

For instance, if you choose the callback address http://xyz.com, the confirmation link would look like http://xyz.com?any_parameter=any_value. Whatever the page http://xyz.com does, it must forward the parameters to the standard API server to finalize the process, here ?any_parameter=any_value.

ttl This defines the confirmation link time-to-live before being disabled. The default value is one "hour". Other possible values are "day" or "week".
pwd_type This defines the type of password which is generated: "num" (default), "alpha" or "alphanum".
pwd_len This defines the length of the password in characters. It is an integer between 6 and 16. The default value is 8.

call sample

This example is the code used in the test case below. It assumes that jQuery and the JavaScript AuverCloud runtime client are loaded in order to use the arc.api() method. See the API client section for more details.


							

errors

code message comments
609 Forbidden parameter value. ttl value is wrong.
641 Unknown token. Either the token ID is unknown or is already burned.
643 Wrong challenge or token value. The challenge is not the expected one.
651 Email address is unknown.

See also the Common errors section.

test bed

Call

To test the API with your own keys, please see the section Application keys in AuverCloud Studio.

api
password_reset
key
email
challenge
token
subject
content
callback
ttl
 send
request
 clear
response
 refresh
challenge
Response
code
msg
data

discussion