Webhook URL cannot be verified.
See original GitHub issueI use the codes in my project directly and I deploy my project onHeroku successfully.
The codes what I use is:
from flask import Flask, request, abort
from linebot import (
LineBotApi, WebhookHandler
)
from linebot.exceptions import (
InvalidSignatureError
)
from linebot.models import (
MessageEvent, TextMessage, TextSendMessage,
)
app = Flask(__name__)
line_bot_api = LineBotApi('YOUR_CHANNEL_ACCESS_TOKEN') #I put my TOKEN
handler = WebhookHandler('YOUR_CHANNEL_SECRET')
@app.route("/callback", methods=['POST'])
def callback():
# get X-Line-Signature header value
signature = request.headers['X-Line-Signature']
# get request body as text
body = request.get_data(as_text=True)
app.logger.info("Request body: " + body)
# handle webhook body
try:
handler.handle(body, signature)
except InvalidSignatureError:
abort(400)
return 'OK'
@handler.add(MessageEvent, message=TextMessage)
def handle_message(event):
line_bot_api.reply_message(
event.reply_token,
TextSendMessage(text=event.message.text))
if __name__ == "__main__":
app.run()
But the error appeared like that:
https://intense-anchorage-90708.herokuapp.com/callback A http status of the response was ‘500 INTERNAL SERVER ERROR’.
I need your help. Thanks a lot.
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Messenger webhook - can't verify the URL - Python
Can't validate the URL I have setup using ngrok. The error message is as follows: Error The URL couldn't be validated. Please try...
Read more >Webhook configuration failed - Developer Community Forum
I am currently configuring the web hook to the mesenger but I don't understand how my application while configuring always says "Cannot validate...
Read more >Mailchimp Extension - Webhook URL can't be verified
I'm using User Role Editor in Wordpress, but can't see an option like that. I've tried "Access civiCRM" and "Create Posts" but they...
Read more >Unable to Verify webhook URL - LINE Developers Community
Hi,. On the console (developer.line.biz/console/channel/XXX/basic), I set up a webhook URL (which works fine and returns HTTP OK 200 on chrome) but when...
Read more >Solved - Unable to create webhook | 3CX Forums
I am having the same problem. I can open the webhoock-url but meta can't verify it. Any solution yet?. Best Regards Daniel Wolf ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Do you press the verify-button in the Developer Center?
This “Verify” means verifying SSL certificate. When you click this verify-button, LINE server sends a dummy webhook. And reply token included webhook is also dummy. So, it is impossible to call reply API.
Thank you be-hase.