```
messaging.sms.segmentInfo(document.getElementById("segmentText").value)
    .then(function(body) {
      printLog(JSON.stringify(body));
    }, function (error) {
      printLog(JSON.stringify(error));
    });
```