# Path: messagebird/conversation_webhook.py
# CONVERSATION_WEBHOOK_EVENT_CONVERSATION_CREATED = 'conversation.created'
# 
# CONVERSATION_WEBHOOK_EVENT_CONVERSATION_UPDATED = 'conversation.updated'


import argparse
import messagebird
from messagebird.conversation_webhook import \
    CONVERSATION_WEBHOOK_EVENT_CONVERSATION_CREATED, \
    CONVERSATION_WEBHOOK_EVENT_CONVERSATION_UPDATED
#!/usr/bin/env python

parser = argparse.ArgumentParser()
parser.add_argument('--accessKey', help='access key for MessageBird API', type=str, required=True)
parser.add_argument('--channelId', help='channel that you want create the webhook', type=str, required=True)
parser.add_argument('--url', help='url for the webhook', type=str)
args = vars(parser.parse_args())

try:
    client = messagebird.Client(args['accessKey'])

    webhook = client.conversation_create_webhook({
        'channelId': args['channelId'],

# Path: messagebird/conversation_webhook.py
# CONVERSATION_WEBHOOK_EVENT_CONVERSATION_CREATED = 'conversation.created'
# 
# CONVERSATION_WEBHOOK_EVENT_CONVERSATION_UPDATED = 'conversation.updated'


# Path: examples/conversation_create_webhook.py
import argparse
import messagebird
from messagebird.conversation_webhook import \
    CONVERSATION_WEBHOOK_EVENT_CONVERSATION_CREATED, \
    CONVERSATION_WEBHOOK_EVENT_CONVERSATION_UPDATED

#!/usr/bin/env python

parser = argparse.ArgumentParser()
parser.add_argument('--accessKey', help='access key for MessageBird API', type=str, required=True)
parser.add_argument('--channelId', help='channel that you want create the webhook', type=str, required=True)
parser.add_argument('--url', help='url for the webhook', type=str)
args = vars(parser.parse_args())

try:
    client = messagebird.Client(args['accessKey'])

    webhook = client.conversation_create_webhook({
        'channelId': args['channelId'],

        'events': [CONVERSATION_WEBHOOK_EVENT_CONVERSATION_CREATED, CONVERSATION_WEBHOOK_EVENT_CONVERSATION_UPDATED],