-
-
Save moski/6493390 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import requests | |
text = u'這是一封測試簡訊 This a test SMS.' | |
endpoint = 'https://rest.nexmo.com/sms/json' | |
data = { | |
'username': '{yours}', | |
'password': '{yours}', | |
'from': '{yours}', | |
'to': '{yours}', | |
'type': 'unicode', | |
'text': text, | |
'status-report-req': 1, | |
'client-ref': '{yours}' | |
} | |
r = requests.post(endpoint, data=data) | |
print r.text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment