Last active
August 29, 2015 14:26
-
-
Save ibotdotout/0a4aabc85c7767cb0679 to your computer and use it in GitHub Desktop.
send line message by using line ID
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
from line import LineClient, LineGroup, LineContact | |
try: | |
client = LineClient("ID", "PASSWORD") | |
print client.authToken #print authToken before error and use this login again | |
#client = LineClient(authToken="AUTHTOKEN") | |
except: | |
print "Login Failed" | |
lineID = "Enter target LineID" | |
try: | |
target = client._client.findContactByUserid(lineID) | |
c = LineContact(client, target) | |
c.sendMessage("hello") | |
except: | |
print("cant find LineID or your LineID is private ID") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment