Created
May 12, 2018 00:53
-
-
Save IbrahimTareq/dd7b2b63366792148498b62a96c841df to your computer and use it in GitHub Desktop.
MessageMedia Messages Python
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
from message_media_messages.message_media_messages_client import MessageMediaMessagesClient | |
import json | |
# Configuration parameters and credentials | |
auth_user_name = 'YOUR_API_KEY' # The username to use with basic/HMAC authentication | |
auth_password = 'YOUR_API_SECRET' # The password to use with basic/HMAC authentication | |
use_hmac_authentication = False # Change to True if you are using HMAC keys | |
client = MessageMediaMessagesClient(auth_user_name, auth_password, use_hmac_authentication) | |
messages_client = client.messages | |
body_value = '''{ | |
"messages":[ | |
{ | |
"content":"My first message", | |
"destination_number":"+61491570156" | |
} | |
] | |
}''' | |
body = json.loads(body_value) | |
result = messages_client.create_send_messages(body) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment