Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After applied fix in #186 there is another error in verifying webhook URL from messaging API #188

Closed
nabito opened this issue Jun 21, 2019 · 3 comments

Comments

@nabito
Copy link

nabito commented Jun 21, 2019

Here is the error when pressing 'verify' on webhook section in console page

line_webhook_1   |   File "/usr/local/app/app.py", line 34, in callback
line_webhook_1   |     handler.handle(body, signature)
line_webhook_1   |   File "/usr/local/app/piti-line-sdk/linebot/webhook.py", line 260, in handle
line_webhook_1   |     func(event)
line_webhook_1   |   File "/usr/local/app/app.py", line 46, in handle_message
line_webhook_1   |     TextSendMessage(text=event.message.text))
line_webhook_1   |   File "/usr/local/app/piti-line-sdk/linebot/api.py", line 101, in reply_message
line_webhook_1   |     '/v2/bot/message/reply', data=json.dumps(data), timeout=timeout
line_webhook_1   |   File "/usr/local/app/piti-line-sdk/linebot/api.py", line 903, in _post
line_webhook_1   |     self.__check_error(response)
line_webhook_1   |   File "/usr/local/app/piti-line-sdk/linebot/api.py", line 926, in __check_error
line_webhook_1   |     raise LineBotApiError(response.status_code, error)
line_webhook_1   | linebot.exceptions.LineBotApiError: LineBotApiError: status_code=400, error_response={"details": [], "message": "Invalid reply token"}

The message received from Line server is:

line_webhook_1   | [2019-06-21 18:35:30,202] INFO in app: Request body: {
line_webhook_1   |   "events": [
line_webhook_1   |     {
line_webhook_1   |       "replyToken": "00000000000000000000000000000000",
line_webhook_1   |       "type": "message",
line_webhook_1   |       "timestamp": 1561142129946,
line_webhook_1   |       "source": {
line_webhook_1   |         "type": "user",
line_webhook_1   |         "userId": "Udeadbeefdeadbeefdeadbeefdeadbeef"
line_webhook_1   |       },
line_webhook_1   |       "message": {
line_webhook_1   |         "id": "100001",
line_webhook_1   |         "type": "text",
line_webhook_1   |         "text": "Hello, world"
line_webhook_1   |       }
line_webhook_1   |     },
line_webhook_1   |     {
line_webhook_1   |       "replyToken": "ffffffffffffffffffffffffffffffff",
line_webhook_1   |       "type": "message",
line_webhook_1   |       "timestamp": 1561142129946,
line_webhook_1   |       "source": {
line_webhook_1   |         "type": "user",
line_webhook_1   |         "userId": "Udeadbeefdeadbeefdeadbeefdeadbeef"
line_webhook_1   |       },
line_webhook_1   |       "message": {
line_webhook_1   |         "id": "100002",
line_webhook_1   |         "type": "sticker",
line_webhook_1   |         "packageId": "1",
line_webhook_1   |         "stickerId": "1"
line_webhook_1   |       }
line_webhook_1   |     }
line_webhook_1   |   ]
line_webhook_1   | }

this issue is after applying fix in #186

@tkgauri
Copy link
Contributor

tkgauri commented Jun 22, 2019

Similar to #37

@nabito
Copy link
Author

nabito commented Jun 22, 2019

@tkgauri thanks for pointing out, I got the line to work without having to press that "Verify" button.

I'll close the issue, however, I think the interface for SSL verification is confusing, people will thought they never pass webhook verification. May be Line dev admin page need some improvement.

@nabito nabito closed this as completed Jun 22, 2019
@tkgauri
Copy link
Contributor

tkgauri commented Jun 24, 2019

Thank you for the feedback.
We would think about it in order to improve our services and make them easy-to-use for everyone.
Cheers 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants