![]() They are described in the Documentation section on single SMS, and you can read about a few of the most useful ones later herein. The send function can accept multiple parameters, which modify the sending differently. The following line simply refers to the sms object and orders the message to be sent to the given phone number. The client will be used every time because it contains objects responsible for all available functions. Formulating server queries belongs to API communication implementation, which the library takes care of for you. Result = (to='+44111222333', message='Hello world!')īut what exactly is going on here? First, a client instance is created, which manages the server connection – which is why you need the token. Simply ordering a single SMS to be sent looks like this: from smsapi.client import SmsApiPlClientĬlient = SmsApiPlClient(access_token=token) In this language, scripts can be clear and concise but at the same time advanced, and our library is no different. Now let’s see what beginning to work with code in Python looks like. Preparations are now complete! Feel free to sign in to the messaging gateway. Paste the auth token into the script or place it in your configuration file.ĭo it yourself #01 – Customer Portal Walkthrough (video tutorial) With it, the program can access the SMSAPI server resources. Next, in the Customer Panel, generate an OAuth 2 authentication token.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |