Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- import json
- bot_name = ''
- bot_key = ''
- auth = (bot_name,bot_key)
- url = "https://api.kik.com/v1/message"
- payload = json.dumps({
- 'messages': [
- {
- 'body': 'Hello I am a bot.',
- 'to': 'me',
- 'type': 'text',
- 'chatId': 'b3be3bc15dbe59931666c06290abd944aaa769bb2ecaaf859bfb65678880afab',
- 'keyboards': [
- {
- 'type':'suggested',
- 'responses':[
- {
- 'type':'text',
- 'body':'You are cool.'
- },
- {
- 'type':'text',
- 'body':'Add more features!'
- }
- ]
- }
- ]
- }
- ]
- })
- headers = {
- 'content-type': "application/json",
- 'cache-control': "no-cache",
- 'postman-token': "578a7919-aa6e-2ced-65cc-32a763069bef"
- }
- body = {
- "features":{}
- }
- response = requests.request("POST", auth=auth, url=url, data=payload, headers=headers)
- print(response.text)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement