Python을 활용하여 Kakao MSG Send Me
Token 값 발급

Code
import os
import json
import requests
def sendToMeMessage(text):
header = {"Authorization": 'Bearer ' + KAKAO_TOKEN} ## Bearer 한칸띄기
url = "https://kapi.kakao.com/v2/api/talk/memo/default/send" #나에게 보내기 주소
post = {
"object_type": "text",
"text": text,
"link": {
"web_url": "https://developers.kakao.com",
"mobile_web_url": "https://developers.kakao.com"
},
"button_title": "Button Title"
}
data = {"template_object": json.dumps(post)}
return requests.post(url, headers=header, data=data)
text = "This is KaKao Message Test!!!!!"
KAKAO_TOKEN = "액세스 토큰값" ##
print(sendToMeMessage(text).text)'IT > Python' 카테고리의 다른 글
| CentOS7 Python3 Setup (0) | 2021.01.20 |
|---|---|
| Python을 활용하여 Kakao 등록 팀원 UUID 값 가지고오기 (0) | 2021.01.14 |
| Python을 활용하여 Slack MSG Send (0) | 2021.01.14 |
| Windows 스케줄러 Python Script 사용 (0) | 2021.01.14 |
| KakaoTalk Proxy Server (0) | 2021.01.14 |