Getting list of SMS messages

Here is an example sh script that will retrieve the running list of SMS messages processed through the babelforce API and services:

ACCESS_ID='yourlongbabelforceapiaccessidgoeshere'
TOKEN='yourlongbabelforceapitokengoeshere'

ENDPOINT="https://services.babelforce.com/api/v2/sms"

curl $ENDPOINT \
-H "X-Auth-Access-Id: $ACCESS_ID" \
-H "X-Auth-Access-Token: $TOKEN" \

 

To get for example the 2nd page of 100 SMS per page, you just use the following:

https://services.babelforce.com/api/v2/sms?page=1&max=100

 

Running the above will give output like this:

 

...

{
"id" : "5f241356-def9-47df-97hd-6cbb3d3719b8",
"dateCreated" : "2015-01-27T02:25:34.000Z",
"type" : "OUTBOUND",
"from" : "4917621937897",
"to" : "4470523247877",
"state" : "SENT",
"source" : "API",
"text" : "text of message ...",
"_url" : "/api/v2/sms/5f241356-def9-47df-97hd-6cbb3d3719b8"
}, {
"id" : "68ffc6e0-874e-4df5-a65r-402774783b7c",
"dateCreated" : "2015-01-27T02:12:53.000Z",
"type" : "INBOUND",
"from" : "4470523247877",
"to" : "4917621937897",
"state" : "RECEIVED",
"source" : "INBOUND",
"text" : "text of message ...",
"_url" : "/api/v2/sms/68ffc6e0-874e-4df5-a65r-402774783b7c"
}

... 

 

 

 

 

Have more questions? Submit a request