How to send batch SMS through babelforce API without coding

Christian Foerster
Christian Foerster
  • Updated

This article describes how you can send bulk sms through the babelforce API platform without the need to develop your own code.

To start with please download the following files and resources:

  • Postman application for your operating system

https://www.getpostman.com/

  • babelforce pre-configured API requests collection and environment setup:

https://download.babelforce.com/examples/babelforce.postman_collection.json

Environment variables for EU region:
https://download.babelforce.com/examples/babelforce-EU.postman_environment.json

Environment variables for US region:
https://download.babelforce.com/examples/babelforce-UNITED-STATES.postman_environment.json

Environment variables for Asia-Pacific region:
https://download.babelforce.com/examples/babelforce-ASIA-PACIFIC.postman_environment.json

  • Data source example file with phone numbers and message text:

https://download.babelforce.com/examples/Send-batch-SMS-list-data.csv

Then follow these 10 steps to setup everything:

  1. Open the Postman application and click on the "Import" button in the left corner. Choose the downloaded babelforce collection and environment files and import it to the Postman appBildschirmfoto_2017-04-21_um_12.29.31.png
  2. You should now see the collection in the Postman app and you should be able to choose between the environments.Bildschirmfoto_2017-04-20_um_13.24.01.png
  3. In the right corner click on the settings wheel and choose "Manage environment". Then chose the profile for your region and click on the name of it.Bildschirmfoto_2017-04-19_um_23.27.29.png
  4. Now Go to your regions babelforce admin website, login with your credentials and click on the profile page. For EU region this would be this site: https://apps.babelforce.com/manager/#/app/manager/account/overview
    From where you can get your "accessID" and "accessToken". Copy the ID and Token and past it into the corresponding environment variables of your region in the Postman app.
  5. In the variable field for "fromNumber" please enter the phone number which should be shown to all the recipients of your SMS. Usually this would be the SMS inbound and outbound number that you've got from babelforce. The "toNumber" and the "messageText" variables you can leave empty, because these get filled with the values from your data CSV file. Click on the "Update" button and save your settings.Bildschirmfoto_2017-04-19_um_23.43.33.png
  6. Now to test your setup click on the "General" section in the babelforce requests collection on the left and open the "Get account details" request. A new tab should open and you can see the request details. Just click on the "Send" button. Everything is pre-configured already. You should see the answer in the window below the request. If everything was setup correctly, it should show your company name and user account profile information.Bildschirmfoto_2017-04-20_um_11.29.42.png
  7. Now you need to prepare your data source file. Open the example file "Send batch SMS list - data.csv" in your preferred spreadsheet application. In the column "toNumber" enter all the mobile numbers you want to send an SMS too. in the column "messageText" enter the SMS text you want do send to. If the SMS text should be the same for all recipients just copy the same text in each field. Then save the file and export as tab-separated CSV file again. Don't edit the first line of the CSV line, because it is needed by the Postman application. Here is an example how the sheet could look like:

    toNumber messageText
    447937985830 Text example 1
    491771789302 Text example 2


  8. In the Postman application click on the "Runner" Button in the left corner. A new window appears where you can define the parameters for the API requests you want to run against the babelforce API.
    Bildschirmfoto_2017-04-20_um_22.45.45.png
  9. To send batch SMS requests please choose the following recommend settings:
  • click on the babelforce collection and choose SMS folder
  • in the environment popup list please choose the environment for your region, e.g. babelforce EU
  • the iterations field you can leave at 1, it will change later to the number of entries you have in the data source csv file
  • for delay we recommend to use 5000 ms to make sure your SMS send requests are throttled and not send all at once, the reason for this to be compliant with regulation requirements, which can be different in every country
  • near the data field click on "Select file" button and choose your saved CSV data file as source, when the file is loaded the number in the "Iterations" field should change to the number of entries you have in the CSV file automatically

10. That's it. You can now click the "Start run" button and start sending your SMS bulk requests against the babelforce API. But be careful and double check your data source file! Once you hit the button, the SMS will be send out immediately one after each other

The Postman Runner will go through each entry in your CSV data file and capture the phone number and message text from it and then send the request against the babelforce platform. The runner iterates through each entry in the file. At the end you should see a summary with the results. The number of passed requests should be the same as the number of iterations. If an error occurs you need to investigate and send this SMS again manually later on.

Bildschirmfoto_2017-04-20_um_13.40.53.png

If you have any questions, you can leave a comment or write to support@babelforce.com.

Was this article helpful?

/

Comments

0 comments

Please sign in to leave a comment.