Skip to content

Instantly share code, notes, and snippets.

@stepw66
Forked from jackrobotics/lineNotify.py
Created July 25, 2019 21:15
Show Gist options
  • Save stepw66/0782a1c20df8fe81f885768f688e1dbd to your computer and use it in GitHub Desktop.
Save stepw66/0782a1c20df8fe81f885768f688e1dbd to your computer and use it in GitHub Desktop.
#!/usr/local/bin/python
# -*- coding: utf-8 -*-
import requests
url = 'https://notify-api.line.me/api/notify'
token = '9IBnp37LVHj0a6W5HLq2dF7sqIjGyEVn2DQtpQq7wYv'
headers = {'content-type':'application/x-www-form-urlencoded','Authorization':'Bearer '+token}
msg = 'ทดสอบภาษาไทย hello'
r = requests.post(url, headers=headers , data = {'message':msg})
print r.text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment