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
NOTE: Adding and editing SMS templates via the config file is only available in IS 5.10.0 and onwards.
- Navigate to <IS_HOME>/repository/conf/sms folder.
- 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.
Adding an SMS notification template using the registry
- Log in to the management console and navigate to Main> Registry> Browse.
- 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)
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
- Log in to the Management Console and click Main> Registry> Browse.
- On the tree view tab, click system > config >identity > sms > accountidrecovery.
- Click on en_us to view the template.
- 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.