# 3.4.4 SMSSync

{% hint style="danger" %}
We are having some issues with the play store at the moment, you can download the SMS Sync app at <https://github.com/ushahidi/SMSSync/releases/download/v3.1.1/smssync-withAnalyticsRelease-v3.1.1-RELEASE.apk>
{% endhint %}

SMSsync is a simple, yet powerful SMS to HTTP sync utility that turns any Android phone into a local SMS gateway by sending incoming messages (SMS) to a configured URL (web service).

*Please note that SMSsync works on any SMS-enabled device running Android 2.1 and above.*

* Once you have downloaded it, click on install to save it on your phone.

<figure><img src="https://content.gitbook.com/content/GBEUb85x3qZ9AiwfCkhF/blobs/G395WRffY0u5XJ4vp9RW/Screenshot_2020-09-14-16-11-45_png.png" alt="Installing SMSsync App on your phone"><figcaption><p>Installing SMSsync App on your phone</p></figcaption></figure>

* Open up the SMSSync Application on your android device, click skip or swipe left, and click done to continue.

<figure><img src="https://content.gitbook.com/content/GBEUb85x3qZ9AiwfCkhF/blobs/qZXwaGfPskb8Bf5J5oI0/Screenshot_2020-09-14-16-14-02_png_and_Screenshot_2020-09-14-16-11-45_png.png" alt="SMSsync interface - SKIP button highlighted"><figcaption><p>SMSsync interface - SKIP button highlighted</p></figcaption></figure>

* On the incoming messages screen, click on the arrow at the bottom right corner to enable SMSsync.

<figure><img src="https://content.gitbook.com/content/GBEUb85x3qZ9AiwfCkhF/blobs/4VhEC02R2WNtKw6in8sH/Screenshot_2020-09-14-16-23-11_png_and_Screenshot_2020-09-14-16-14-02_png.png" alt="Enable SMSsync as your sms platform service"><figcaption><p>Enable SMSsync as your sms platform service</p></figcaption></figure>

* Once you have enabled SMSsync, you will be redirected to the integrations screen. Start the SMSSync Service to start fetching messages in your app.
* Click on the custom web service to configure SMSsync with your deployment.

<figure><img src="https://content.gitbook.com/content/GBEUb85x3qZ9AiwfCkhF/blobs/CLjNNqeRKQpe2Vl1jNv3/Screenshot_2020-09-15-11-20-22_png_and_Downloads.png" alt="Integration screen"><figcaption><p>Integration screen</p></figcaption></figure>

* Manage custom web services screen will open, you’ll note that you can manage multiple Sync URLs on the app.&#x20;

<figure><img src="https://content.gitbook.com/content/GBEUb85x3qZ9AiwfCkhF/blobs/3yVn1jho3SXEVLt9YDSx/Screenshot_2020-09-15-11-21-21_png.png" alt="Manage Custom Web Service Page - Green (+) icon higlighted by a red arrow to add custom web services"><figcaption><p>Manage Custom Web Service Page - Green (+) icon higlighted by a red arrow to add custom web services</p></figcaption></figure>

* To add a new Sync URL, tap on the Add icon on the actionbar. An input dialog should open.

#### Configuring SMSsync datasource on your Ushahidi Platform

* Open your deployment i.e *name.ushahidi.io*, go to datasource configuration in your setting page.
* Click on ***the drop down icon on the right as shown***

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2F9PiG6ZzTAnehYr0O6fid%2F3.4.17.png?alt=media&#x26;token=62b9113c-78c2-4f00-b184-38658efb3b7a" alt="Settings -Button highlighted to access the SMS Sync data source configuration"><figcaption><p>Settings -Button highlighted to access the SMS Sync data source configuration</p></figcaption></figure>

* Follow the instructions given to you below.

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2FY5Js2wqrOrvwzTMrdjfo%2F3.4.18.png?alt=media&#x26;token=100884d2-6b40-4da9-85f9-7084ae359515" alt="Android App settings under Add Data Source page"><figcaption><p>Android App settings under Add Data Source page</p></figcaption></figure>

* You will need the ***Sync URL*** to configure SMSSync.
* Set a SMSSync secret key for security purposes.
* Click on ***Save.***
* To enable/disable this datasource , simply click on the green toggle to accept survey submissions.

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2FlshGs2dgq0aSRHv29ztA%2F3.4.19.png?alt=media&#x26;token=93ae69f8-56f6-441a-8b3c-adbe138d318d" alt="Enabling SMSsync as a datasource on your Ushahidi platform"><figcaption><p>Enabling SMSsync as a datasource on your Ushahidi platform</p></figcaption></figure>

* Click on the toggle to import your messages' response to a survey.
* Select the survey you wish to import your messages to.
* Select which field should be assigned to populate the data from SMSsync.

### SMSsync setup for Ushahidi Platform SMS connectivity

* Go back to the input dialog on your SMSsync App and add the following details;

<figure><img src="https://content.gitbook.com/content/GBEUb85x3qZ9AiwfCkhF/blobs/TRPKEJsU4Pjlf8xYiCpY/Screenshot_2020-09-15-11-40-05_png.png" alt="Custom web service configuration settings."><figcaption><p>Custom web service configuration settings</p></figcaption></figure>

* ***Title for the custom service:*** This can be the name of your deployment or any title you see fit
* ***Custom web service Url:***  Enter the Sync URL in step 2 from your deployment as shown in the 'Android settings' image above i.e ["https://**yourdeploymentname.api**.*ushahidi.io*/sms/smssync".](https://yourdeploymentname.api.ushahidi.io/sms/smssync)
* ***Secret key:*** Make sure you enter the exact key as the one you entered in your deployment android setting as shown in the 'Android settings' image above.&#x20;
* Once you enter your secret key, you are done with the configuration, do not change the rest of the settings.
* Click ***ADD*** or ***test integration*** to save the new entry.

*Nb:The secret key should be presented as string of any characters without spaces. Enter a comma separated value for the keyword(s). These keywords will be used by SMSsync to filter incoming SMS and pending messages to the Sync URL you are adding. As of v2.0.2. You can now add Regular Expression code for filtering. This means, it can either be CSV or RegExp. It cannot be both.*

*Note: Version 2.5 or higher supports*[ *basic auth*](http://en.wikipedia.org/wiki/Basic_access_authentication) *credentials in the URL, e.g.* <https://username:pass@example.com/api-v1/add-record/>*.*

* You will now need to start the SMSSync Service to start forwarding messages to the platform. To start the SMSSync service
  * Make sure that you have added and enabled(checked) the Sync URL you added above.
  * On the integration screen, tap on the Start SMSsync service to start the service if you had not enabled it.

You should be all set to work with SMSSync and Ushahidi now. Unstructured posts via SMS will now be pulled into the platform.

If you’d like to edit your SMSSync configuration, simply click on the drop down icon on the right while on the data sources list page and make your changes.

For more details on how to manage messages within SMSSync, see [configuration instructions on the SMSSync Website](http://smssync.ushahidi.com/configure/)
