Created
August 6, 2022 05:12
-
-
Save tejastank/c7099f22bca11b7117521b9c8d8e8daa to your computer and use it in GitHub Desktop.
Well tested and implemented software via official whtsapp API
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
import requests | |
import json | |
url = "https://graph.facebook.com/v13.0/101878115921874/messages" | |
payload = json.dumps({ | |
"messaging_product": "whatsapp", | |
"to": "918733067278", | |
"type": "template", | |
"template": { | |
"name": "hello_world", | |
"language": { | |
"code": "en_US" | |
} | |
} | |
}) | |
headers = { | |
'Content-Type': 'application/json', | |
'Authorization': 'Bearer EAAIcDJEZC4KMBAGRZAz9rokLqP3sRHgC24BuyWVi8ZBwLVt1jnC4cZCbkJQudMzNCE9iYL2fmjGGxG9BIcJwrhXdbYDaCb2gGIfZCZBiVfKLtkX4fChTayg9C9ZCgq07RLgoBC0kahdOQ9M0WOYaj6U5xQZA2tdttjLUgWZBH43pkRJSP3kH6AkvtQ22PKYpEGfOTQ8XZASer0ZAwZDZD' | |
} | |
response = requests.request("POST", url, headers=headers, data=payload) | |
print(response.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment