Managing SMS Notification Templates From the Registry in WSO2 Identity Server

The latest release of WSO2 Identity Server 5.10.0 and the latest WUM version of WSO2 IS 5.7.0 supports notifications via both the EMAIL channel and the SMS channel. This feature is available in improved User Self-Registration API and new Username and Password Recovery APIs.

If you are using IS 5.10.0, all the default templates are packed to the product by default. If you are using IS 5.7.0, you have to manually add the templates to the registry.

Adding an SMS notification template using the config files

  1. Navigate to <IS_HOME>/repository/conf/sms folder.
  2. Click on the sms-templates-admin-config.xml file to view default templates and edit them. NOTE: SMS Templates can have only the following attributes.
- displayName
- type
- locale
- body

Adding an SMS notification template using the registry

  1. In the tree view tab, click on system>config>identity.

3. Click Add Collection and enter the collection name as sms. (NOTE: the names are case sensitive)

4. Click on the sms directory and click Add Collection and enter the collection name as accountidrecovery. (NOTE: accountidrecovery is the type of the template)

5. Click on Add Resource.

6. Select the method as Create Text Content.

7. Provide name as en_us.

8. Add the SMS notification template body. (NOTE: Include placeholders in the SMS template body)

[“Hello, your username is {{userstore-domain}}/{{user-name}}@{{tenant-domain}}”]

9. Click on en_us resource and add the following properties.

display : accountIdRecovery
type : accountIdRecovery
locale : en_US

Editing an SMS notification template from the registry

  1. On the tree view tab, click system > config >identity > sms > accountidrecovery.
  2. Click on en_us to view the template.
  3. Click Display as text to view the template or click Edit as text to edit the template.

Now you know all about adding and editing notification templates. Hope this was useful. Cheers.

A big eager beaver