asfenlab.blogg.se

Sms plus registrarse
Sms plus registrarse








sms plus registrarse

Of seconds to wait for a message to arrive. Meaning of timeout is a bit different - timeout is handled as total number Wait_until_arrived receives the same parameters as send_sms_state, but This function continuously checks state of given message until the service In order to wait for the message to arrive user can use wait_until_arrivedįunction: > from sms_plusserver import wait_until_arrived > wait_until_arrived ( 'a1d0c6e83f027327d8461063f4ac58a6' ) 'arrived' # alternatively: "new" or "processed" Timeout parameters: check_sms_state ( 'a1d0c6e83f027327d8461063f4ac58a6', timeout = 30, fail_silently = True ) Waiting for a message to arrive Similar to send_sms, check_sms_state accepts also fail_silently and To check status of a message with given "Handle ID" user can callĬheck_sms_state function: > from sms_plusserver import check_sms_state > check_sms_state ( 'a1d0c6e83f027327d8461063f4ac58a6' ) 'arrived' # alternatively: "new" or "processed" In this case, send_sms function will return None when error occurs. Provider's API, user can set fail_silently parameter to True: send_sms ( '+4911122233344', 'Hello!', fail_silently = True ) To silence exceptions raised due to network errors or errors returned from Specify network timeout for each request: send_sms ( '+4911122233344', 'Hello!', timeout = 30 ) Debug messages will not receive "Handle ID": send_sms ( '+4911122233344', 'Hello!', debug = True )Īll API calls are made using HTTP requests to Plusserver web API. In order to test SMS service without sending actual message, user can setĭebug parameter to True. To False: > from sms_plusserver import send_sms > send_sms ( '+4911122233344', 'Hello!', registered_delivery = False ) True # No "Handle ID", just True (message sent) or False (error) To send unregistered message user can set registered_delivery parameter This identifier allows user to check message status.

sms plus registrarse sms plus registrarse

Messages on Plusserver platform can be tagged using project param: send_sms ( '+4911122233344', 'Hello!', project = 'MyProject' )īy default all messages receive unique identifiers - "Handle ID". The easiest way to send a message is to call send_sms function: > from sms_plusserver import send_sms > send_sms ( '+4911122233344', 'Hello!' ) 'a1d0c6e83f027327d8461063f4ac58a6' # Handle ID - unique message identifier

#Sms plus registrarse password

from sms_plusserver import configure configure ( # Your Plusserver credentials (required): username = 'user', password = 'pass', # Optional parameters: project = 'MyAppNotifications', # Name of your app / project orig = 'MyApp', # SMS origin (name or phone number) encoding = 'utf-8', # Set default text encoding max_parts = 3, # Send multiple messages when text exceeds 160 character limit timeout = 60 # Default timeout for service API calls ) Sending messages Will be used by other functions / classes of the module by default. Messages easier: from sms_plusserver import configure, send_sms # Configure service: configure ( username = 'user', password = 'pass' ) # Send a message: send_sms ( '+4911122233344', 'Hello!' ) ConfigurationĬonfigure function allows to set all configuration options.

sms plus registrarse

Sms_plusserver provides module-level convenience functions to make sending In order to use this library users need to have an account on Python library that allows to send messages using Plusserver SMS platform.










Sms plus registrarse