Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel2
Receiving Webhooks

...

MifosX will send along a few HTTP headers to differentiate between event types.

NameDescription
X-Mifos-EntityThe entity type that was triggered.
X-Mifos-ActionThe action triggered on the entity type.
X-Mifos-Platform-TenantId

The tenant which experienced the event.

...

So for the Sms Bridge template in the Create Hook form, you need to give http://localhost:9191/modules/sms as the payload url, type "twilio" as the sms provider (without the quotes) and fill the remaining 3 fields (Phone Number, SMS Provider Account Id, SMS Provider token) with the details you received when registering an account in Twilio.

WARNING Troubleshooting :

Do not create a SMS Bridge hook with your own mobile number if you have not registered for Twilio. This will cause a wrong api key to be generated by the bridge which will be stored in MifosX. To circumvent correct that, you will need to delete the hook in MifosX and manually generate a DELETE request to mifos-twilio-bridge to delete the api key since it won't allow multiple api keys per tenant.

WARNING If you create multiple clients in Mifos X with the same mobile number for testing (by deleting the client and creating a new one), that might not be supported by the bridge application because of unique mobile number constraints.

If you somehow lose/clear the db contents for bridge application, it is better to delete the hook in MifosX and create a new one as the bridge application won't find the api key of the old hook in it's db.

If you get a hsqldb lock exception, make sure you are not trying to access from 2 places at the same time by closing any sql editor, hsqldb ide plugins, other services that might be using it, etc.

INFO: The only 2 events in Mifos X currently supported by the bridge application are CREATE CLIENT and REPAYMENT LOAN. The bridge application won't react to other events registered for the SMS Bridge Hook. As of now, it is only meant for demo purposes as specialists can implement their own preferred SMS service provider using the WEB template for hook.

...