Category : line-api

linebot use Flask python my code >>https://drive.google.com/file/d/1NxrjkcefeJ2eazCmMydKT3mbuLn0ecIJ/view?usp=sharing def saveImage(message_id):not working i dont know how to solving this problem def saveImage(message_id): line_bot_api = LineBotApi(Channel_access_token) message_content = line_bot_api.get_message_content(message_id) file_path = ‘C:Usersb6109868DesktopLineBotProjectsaveimg’ with open(file_path, ‘wb’) as fd: for chunk in message_content.iter_content(): fd.write(chunk) return 200 i dont know how to get image from line user and save image in ..

Read more

I am following this tutorial and have gotten the code to build successfully on Heroku but for Step 5 Part 2. I get the below error. The webhook returned an HTTP status code other than 200.(503 Service Unavailable) Confirm that your bot server returns status code 200 in response to the HTTP POST request sent ..

Read more

I created a Line bot in Python which works very well in reply mode. But when I want to push a message it doesn’t work… Here is my code in which I remove my token etc. I am a beginner so I don’t understand everything in this template. Also the only programming langage I understand ..

Read more

My current script is this: import os from flask import Flask, request, abort from linebot import ( LineBotApi, WebhookHandler ) from linebot.exceptions import ( InvalidSignatureError ) from linebot.models import * app = Flask(__name__) CHANNEL_ACCESS_TOKEN = "MY TOKEN" CHANNEL_SECRET = "MY SECRET" line_bot_api = LineBotApi(CHANNEL_ACCESS_TOKEN) handler = WebhookHandler(CHANNEL_SECRET) @app.route("/callback", methods=[‘POST’]) def callback(): signature = request.headers[‘X-Line-Signature’] body ..

Read more