-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathCreateInstance.py
More file actions
34 lines (29 loc) · 1008 Bytes
/
CreateInstance.py
File metadata and controls
34 lines (29 loc) · 1008 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from whatsapp_api_client_python import API
greenAPI = API.GreenApiPartner(
"gac.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst"
)
def main():
settings = {
"name": "Created by Python SDK",
"webhookUrl": "https://webhook.url",
"webhookUrlToken": "auth_token",
"delaySendMessagesMilliseconds": 5000,
"markIncomingMessagesReaded": "yes",
"markIncomingMessagesReadedOnReply": "yes",
"outgoingWebhook": "yes",
"outgoingMessageWebhook": "yes",
"outgoingAPIMessageWebhook": "yes",
"stateWebhook": "yes",
"incomingWebhook": "yes",
"deviceWebhook": "yes",
"keepOnlineStatus": "yes",
"pollMessageWebhook": "yes",
"incomingBlockWebhook": "yes",
"incomingCallWebhook": "yes",
"editedMessageWebhook": "yes",
"deletedMessageWebhook": "yes"
}
response = greenAPI.partner.createInstance(settings)
print(response.data)
if __name__ == '__main__':
main()