Triggered email template, replace variables in links

Here’s my workaround:

export function doRegistration(email, password, firstName, lastName) {
 return wixUsers.register(email, password, {
 "contactInfo": {
 "firstName": firstName,
 "lastName": lastName
    }
  } )
  .then( (results) => {
    wixUsers.emailUser('RQVmcWk', results.user.id, {
 "variables": {
 "name": firstName,
 "token":results.approvalToken, //This is the new line.
 "verifyLink": `https://www.domain.com/post-register?token=${results.approvalToken}` //You don't need this variable anymore.
      }
    } );
  } );
}

Then, on your triggered email insert the link with the fixed baseURL and the token as a variable like this: https://www.domain.com/post-register?token=${token}

And that should do the trick.

Enjoy :slight_smile: