Developer Tools
BasicText SMSCampaignSendOTPVirtual NumberResellerSample CodePhonebookError Code
HOME LOGIN SIGN UP
  • Send SMS in PHP
  • Send SMS in Python
  • Send SMS in JAVA
  • Send SMS in JAVA For XML API
  • Send SMS in C#
  • Send SMS in Google Appscript
  • Send SMS in Windows 8
  • Send SMS in Android
  • Send SMS in iOS
  • Send SMS in VB6
  • Send SMS in Oracle
  • Send SMS in Go Language
  • Api Postman Collection

Google Appscript Sample Code Send SMS

Code:

//write this code in your .gs file
//Your authentication key
var authKey = "YourAuthKey";
//Multiple mobiles numbers separated by comma
var mobileNumber = "9999999";
//Sender ID,While using route4 sender id should be 6 characters long.
var senderId = "102234";
//Your message to send, Add URL encoding here.
var message = "Test message";
//Define route
var route = "default"; var payload = { "authkey": authKey, 'mobiles' : mobileNumber, 'message' : message, 'sender' : senderId, 'route' : route }; var options = { "method": "post", "payload": payload }; var res = UrlFetchApp.fetch("http://api.msg91.com/api/sendhttp.php?", options); var resAsTxt = '' + res + ''; Logger.log(resAsTxt)

© 2008-2025 | All Rights Reserved.