Module bluevia :: Class BlueViaInboundSMS
[hide private]
[frames] | no frames]

Class BlueViaInboundSMS

source code

BlueVia --+
          |
         BlueViaInboundSMS

The BlueVia class for receiving SMS.

Instance Methods [hide private]
 
__init__(self, sandbox='_Sandbox', realm='BlueVia', version='v1')
Initialize the BlueViaInboundSMS object
source code
 
receiveSMS(self, shortcode)
Receive all SMS sent to the shortcode with the Keyword defined during BlueVia App generation
source code
 
subscribeNotifications(self, shortcode, keyword, endpoint, correlator)
Subscribe to Receive SMS notifications
source code
 
unsubscribeNotifications(self, url)
Unsubscribe to Receive SMS notifications
source code

Inherited from BlueVia: hasCredentials, loadAccessToken, setAccessToken, setConsumer, setDebug

Inherited from BlueVia (private): _debug, _signAndSend

Class Variables [hide private]

Inherited from BlueVia: access_token, consumer, debugFlag, environment, http, realm, version

Method Details [hide private]

__init__(self, sandbox='_Sandbox', realm='BlueVia', version='v1')
(Constructor)

source code 

Initialize the BlueViaInboundSMS object

Parameters:
  • sandbox - (string): Indicates whether testing should be done in Sandbox mode. Use "" for real network access; Default: "_Sandbox",
  • realm - (string): Realm string; Default: "BlueVia"
  • version - (string): BlueVia API version; Default: "v1"

receiveSMS(self, shortcode)

source code 

Receive all SMS sent to the shortcode with the Keyword defined during BlueVia App generation

Parameters:
  • shortcode - (string): SMS shortcode including country code without "+", e.g. "44"
Returns:
(tuple): (HTTP status, (dict) receivedSMS). HTTP status == "200" for success.

subscribeNotifications(self, shortcode, keyword, endpoint, correlator)

source code 

Subscribe to Receive SMS notifications

Parameters:
  • shortcode - (string): SMS shortcode including country code without "+", e.g. "44"
  • keyword - (string): The registered SMS Keyword of the application
  • endpoint - (string): The url to which BlueVia shall post the relevant SMS
  • correlator - (string): The correlator allows to identify the subscription
Returns:
(tuple): (HTTP status, unsubscribeURL). HTTP status == "201" for success. Use unsubscribeURL in method unsubscribeNotifications.

unsubscribeNotifications(self, url)

source code 

Unsubscribe to Receive SMS notifications

Parameters:
  • url - (string): The unsubscribe URL returned by the subscribeNotifications method
Returns:
(tuple): (HTTP status, unsubscribeURL). HTTP status == "204" for success.