Overview

GupShup API enables developers to build SMS-based widgets and services. Using GupShup API, developers can build a variety of widgets and services that advertise their GupShup group messages on their website or blog, and post messages to their group through their favorite website.

Currently, SMS delivery is limited to Indian mobile phones.

GupShup API uses a REST-based interface. All requests are made as HTTP GET and POST requests. The REST response is either a XML or a JSON block.

API Methods

GupShup.getPublicStream

Overview  »  GupShup.getPublicStream

Parameters / Description

At GupShup we recognize that privacy is important. This document outlines the types of personal information we receive and collect when you use Webaroo's services, as well as some of the steps we take to safeguard information. We hope this will help you make an informed decision about sharing personal information with us.

Parameter Required/Optional Description
v required This string should be set to 1.0 for this version of the API.
method required Get public stream from GupShup. Must be gupshup.getPublicStream.
from optional Starting message position from GupShup stream. Default is 0.
format optional Supported output format. Either XML (default) or JSON.
range optional Maximum number of items to fetch. Default is 10.
skipAdult optional Skip adult content from the GupShup stream. Either TRUE (default) or FALSE.

Sample Request

http://api.smsgupshup.com/GupshupAPI/rest?skipadult=false&from=0&range=10 &method=gupshup.getPublicStream&v=1.0&format=xml

Sample Response (XML)

Sample Response (JSON)

Error Codes

errorCode errorString
1 The specified range is invalid. Range can be a positive integer with maximum value of 15.
102 The specified response format "%0" is not supported.
107 The specified version "%0" is invalid. Please specify version as "1.0" or leave the field blank.
108 The specified method "%0" is not valid GupShup api.
109 The parameter "%0" is required. Please resend request.
110 The parameter "%0" is invalid. The parameter should be of type "%1".
111 The parameter "%0" is invalid. The parameter should be within a value of "%1".
113 The API call has not been executed since you have exceeded the throttle %0 limit of "%1".

Sample Error Response (XML)

Sample Error Response (JSON)

groups.getMessage

Overview  »  groups.getMessage

Parameters / Description

Parameter Required/Optional Description
v required This string should be set to 1.0 for this version of the API.
method required Get latest message sent to a group. Must be groups.getMessage.
group required Name of the group.
format optional Supported output format. Either XML (default) or JSON.

Sample Request

http://api.smsgupshup.com/GupshupAPI/rest?group=jumpy&method=groups .getMessage&v=1.0&format=xml

Sample Response (XML)

Sample Response (JSON)

Error Codes

errorCode errorString
2 The specified group name is invalid.
102 The specified response format "%0" is not supported.
107 The specified version "%0" is invalid. Please specify version as "1.0" or leave the field blank.
108 The specified method "%0" is not valid GupShup api.
109 The parameter "%0" is required. Please resend request.
113 The API call has not been executed since you have exceeded the throttle %0 limit of "%1".

Sample Error Response (XML)

Sample Error Response (JSON)

groups.getStream

Overview  »  groups.getStream

Parameters / Description

Parameter Required/Optional Description
v required This string should be set to 1.0 for this version of the API.
method required Get recent message stream of a group. Must be groups.getStream.
group required Name of the group.
format optional Supported output format. Either XML (default) or JSON.
from optional Starting message position from GupShup stream. Default is 0.
range optional Maximum number of items to fetch. Default is 10.

Sample Request

http://api.smsgupshup.com/GupshupAPI/rest?group=jumpy&from=0&range=10 &method=groups.getStream&v=1.0&format=xml

Sample Response (XML)

Sample Response (JSON)

Error Codes

errorCode errorString
2 The specified group name is invalid.
3 The specified range is invalid. Range can be a positive integer with maximum value of 15.
102 The specified response format "%0" is not supported.
107 The specified version "%0" is invalid. Please specify version as "1.0" or leave the field blank.
108 The specified method "%0" is not valid GupShup api.
109 The parameter "%0" is required. Please resend request.
110 The parameter "%0" is invalid. The parameter should be of type "%1".
111 The parameter "%0" is invalid. The parameter should be within a value of "%1".
112 You are trying to access a private group. The method \"%0\" is only supported for public groups.
113 The API call has not been executed since you have exceeded the throttle %0 limit of "%1".

Sample Error Response (XML)

Sample Error Response (JSON)

groups.getInfo

Overview  »  groups.getInfo

Parameters / Description

Parameter Required/Optional Description
v required This string should be set to 1.0 for this version of the API.
method required Get information about a group. Must be groups.getInfo.
group required Name of the group.
format optional Supported output format. Either XML (default) or JSON.

Sample Request

http://api.smsgupshup.com/GupshupAPI/rest?group=jumpy&method=groups.getInfo &v=1.0&format=xml

Sample Response (XML)

Sample Response (JSON)

Error Codes

errorCode errorString
2 The specified group name is invalid.
102 The specified response format "%0" is not supported.
107 The specified version "%0" is invalid. Please specify version as "1.0" or leave the field blank.
108 The specified method "%0" is not valid GupShup api.
109 The parameter "%0" is required. Please resend request.
112 You are trying to access a private group. The method \"%0\" is only supported for public groups.
113 The API call has not been executed since you have exceeded the throttle %0 limit of "%1".

Sample Error Response (XML)

Sample Error Response (JSON)

groups.subscribeGroupToken

Overview   »  groups.subcribeGroupToken

Parameters / Description

Parameter Required/Optional Description
v required This string should be set to 1.0 for this version of the API.
method required Subscribe user to a group. Must be groups.subscribeToken.
group required in phase II Name of the group.
phone required Phone number of the user.
token required in phase II  
confirm required in phase II A 4 digit alpha numeric string that is sent to user's phone.
format optional Supported output format. Either XML (default) or JSON.

Sample Request - Phase I

http://api.smsgupshup.com/GupshupAPI/rest?phone=9819535746&group=jumpy &method=groups.subscribeGroupToken&v=1.0&format=xml

Sample Response - Phase I (XML)

Sample Response - Phase I (JSON)

Sample Request - Phase II

http://api.smsgupshup.com/GupshupAPI/rest?phone=9819535746&group=jumpy &confirm=UY9Z&token=85aa39fbcf69e44ff603a2e2391f1b22&method= groups.subscribeGroupToken&v=1.0&format=xml

Sample Response - Phase II (XML)

Sample Response - Phase II (JSON)

Error Codes

errorCode errorString
1 The specified group name is invalid.
2 The specified phone number is invalid.
3 Due to privacy policy of the parties involved the current action is deemed invalid.
5 The specified phone number has 5 unconfirmed actions. All actions to %0 have now been disabled pending further confirmation.
6 The token string specified is invalid.
7 The confirmation string specified is invalid.
8 The user "%0" has already subscribed to group "%1".
9 There have been more that 5 attempts. This action has now been disabled.
10 Subscription action is only supported for public groups.
102 The specified response format "%0" is not supported.
107 The specified version "%0" is invalid. Please specify version as "1.0" or leave the field blank.
108 The specified method "%0" is not valid GupShup api.
109 The parameter "%0" is required. Please resend request.
110 The parameter "%0" is invalid. The parameter should be of type "%1".
111 The parameter "%0" is invalid. The parameter should be within a value of "%1".
113 The API call has not been executed since you have exceeded the throttle %0 limit of "%1".

Sample Error Response (XML)

Sample Error Response (JSON)

API Throttling

Description

In order to prevent Denial Of Service attacks, we are currently throttling the number on requests from a particular IP address to the following limits.

Throttle timing Throttle Warn Value Throttle Limit Value
per Minute 25 30
per Hour 990 1000
per Day 9990 10000

A throttle tag is appended with the response once a throttle warn limit is reached.

Sample Throttle Response (XML)

Sample Throttle Response (JSON)

The following error response will be returned once the throttling limit is reached.

Sample Throttle Response (XML)

Sample Throttle Response (JSON)

 

Contact Us

 
About GupShup | Contact Us | Blog | Advertisers | Enterprise | Developer | Terms | Privacy | FAQ | Site Map
© 2008 Webaroo Technology (India) Private Limited. All Rights Reserved.