SysSendPasswordResetEmailAdvancedWithExpiry
Triggers the sending of a password reset email to the specified user - but allows the dev to override the email template that will be used. Note that the user must have an email identity attached to their profile.
Example serviceParams (for Sendgrid dynamic templates):
{
"templateId": "template-id-guid",
"dynamicData": {
"aKey": "aValue"
},
"categories": [
"category1",
"category2"
]
}
Service | Operation |
---|---|
user | SYS_SEND_PASSWORD_RESET_EMAIL_ADVANCED_WITH_EXPIRY |
Method Parameters
Parameter | Description |
---|---|
profileId | The profileId of the user to send the password reset email to |
tokenTtlInMinutes | The time-to-live for the password reset url, in minutes |
serviceParams | The service-specific email paramaters |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var userProxy = bridge.getUserServiceProxy();
var tokenTtlInMinutes = 1440;
var serviceParams = {
"templateId": "template-id-guid",
"dynamicData": {
"aKey": "aValue"
},
"categories": [
"category1",
"category2"
]
};
var postResult = userProxy.sysSendPasswordResetEmailAdvancedWithExpiry(
"aaa-bbb-ccc-ddd", // profileId
tokenTtlInMinutes, // Number of minutes before the reset URL expires
serviceParams); // template Id and any subst parameters
if (postResult.status == 200) {
// Success!
}
// Cloud Code only. To view example, switch to the Cloud Code tab
JSON Response
{
"status": 200,
"data": null
}