/
SMS Service (python)

NOTE: Trivore ID Documentation has moved to https://trivoreid.com

The content on this site IS OUT OF DATE!

This space has been archived!

Please go ahead to the new site!

SMS Service (python)





List of all options:

  • Get list of all supported regions

  • Send SMS message

  • Send SMS message to a user

Get list of all supported regions

regions = api.sms_service.get_supported_regions() print(regions[5:10])





[{'regionCode': 'AG', 'name': 'Antigua and Barbuda', 'callingCode': 1, 'nationalCodes': ['268'], 'flagURL': '/res/flags2/ag.png'}, {'regionCode': 'AI', 'name': 'Anguilla', 'callingCode': 1, 'nationalCodes': ['264'], 'flagURL': '/res/flags2/ai.png'}, {'regionCode': 'AL', 'name': 'Albania', 'callingCode': 355, 'nationalCodes': [], 'flagURL': '/res/flags2/al.png'}, {'regionCode': 'AM', 'name': 'Armenia', 'callingCode': 374, 'nationalCodes': [], 'flagURL': '/res/flags2/am.png'}, {'regionCode': 'AO', 'name': 'Angola', 'callingCode': 244, 'nationalCodes': [], 'flagURL': '/res/flags2/ao.png'}]



Send SMS message

from trivoreid.models.sms import SMSMessage msg = SMSMessage() msg.to = '+358401234567' msg.to_name = 'John Smith' msg.to_region = 'FI' msg.from_name = 'trivoreid' msg.messageClass = 1 msg.text = 'Example message' # send using JSON playload response = api.sms_service.send(msg, json_playload=True) # send using query parameters response2 = api.sms_service.send(msg) print(response)







Send SMS message to a user

Send SMS message to all group members

Sending SMS message to all primary (first) mobile numbers of users that belong to the defined groups.

SMS Service Models

SMSMessage

SMSResponse

NOTE: Trivore ID Documentation has moved to https://trivoreid.com

The content on this site IS OUT OF DATE!

This space has been archived!