linebot: APIError 400 The property, 'to', in the request body is invalid (line: -, column: -)
windgo1019 opened this issue · comments
I usw win10 and download drone-line-v1.4.0-windows-386.exe
When I get a secret and token
I use this command to start webhook
drone-line-v1.4.0-windows-386.exe --secret secret_key --token token_key webhook
then i use this command to send message
drone-line-v1.4.0-windows-386.exe --secret secret_key --token token_key --to windgo --message "test"
or
drone-line-v1.4.0-windows-386.exe --secret secret_key --token token_key --to @nle4159v --message "test"
then i got a error mesage
"2016/12/19 11:21:57 linebot: APIError 400 The property, 'to', in the request body is invalid (line: -, column: -)"
could you give me a suggest?
Your user ID is the wrong format. Please follows the following steps:
- Setup webhook service.
drone-line-v1.4.0-windows-386.exe --secret secret_key --token token_key webhook
-
Add bot account to your friend list.
-
Send message to bot account
You can see the following screen shots to show your personal ID
Please Note User ID
format.
- Send message:
drone-line-v1.4.0-windows-386.exe --secret secret_key --token token_key --to U772346xxxxxxxx --message "test"
@windgo1019 resolve your problem?
Thank for your reply!
I find the different point
I run the drone-line-v1.4.0-windows-386.exe then the program just stop in
"Line Webhook Server Listin on 8088 port"
so I cant get the User ID to go next step
I try it in 2 PC ,drone-line-v1.4.0-windows-amd64.exe and drone-line-v1.4.0-windows-386.exe ,but i get the same result
below is my run command:
drone-line-v1.4.0-windows-amd64.exe --secret e27bfd26c58c279b24eebea7f23b69b3 --token HkCs4ouXy5x1FPxU5DrbMpLPH5Uz9rV6Ek9D8aHDLktos3SKr//V4pgi+H7ijV1MfBqLdIbhsJBwbQgtogr4aZRWyjv8tBjLi8SRTELG+2NmMu4ZVGOZLOE/3LRXUtolkZSE4kfRojR0XscLybJckAdB04t89/1O/w1cDnyilFU= webhook
You are missing some steps. Please get User ID first.
After running webhook service. You need to run ngrok
command as following:
$ ngrok http 8088
Then you will get ngrok URL and put it into Webhook URL field on Line developer admin console.
ref: https://blog.wu-boy.com/2016/11/send-line-notification-using-docker-written-in-golang/
Thank you!
I already message LineBot!
Please close this issue if above solution is working for you.