Reputation: 1
I use the following simple code to test my line userid and push message.
I found my line token can't query other person profile and push message to others. It seems to be a token problem. Because i use my friend's token every thing is fine.
Did anyone encounter the same problem?
Many thanks.
Following is my code. by the way the token is real token.(for debug test and Valid for 3 days)
from linebot import LineBotApi
from linebot.models import TextSendMessage
line_bot_api = LineBotApi('4gi+D62U0un7Fe9jT5eFOHLaJYzGvYWkRKrLp09oS4nql9opjqKf45hKYYrnZERg1pQeOlIqPFQsZJIAl5YM8xwOFV+TppZUAm4nlDJNbKv+0GjofpP1MnxTG0CJAxpNLFoVoQrgvnLUFhW2bl87kgdB04t89/1O/w1cDnyilFU=')
profile = line_bot_api.get_profile('userid')
print(profile.display_name)
print(profile.user_id)
print(profile.picture_url)
print(profile.status_message)
result = line_bot_api.multicast(['userid1', 'userid2'], TextSendMessage(text='Hello World!'))
Upvotes: 0
Views: 193