question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webhook URL cannot be verified.

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
be-hasecommented, Apr 6, 2017

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.

0reactions
BibekStha123commented, Jun 21, 2019

Thank you be-hase.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found