Skip to content

Instantly share code, notes, and snippets.

@IbrahimTareq
Created May 12, 2018 00:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IbrahimTareq/dd7b2b63366792148498b62a96c841df to your computer and use it in GitHub Desktop.
Save IbrahimTareq/dd7b2b63366792148498b62a96c841df to your computer and use it in GitHub Desktop.
MessageMedia Messages Python
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