Q&A

Could push message to Group chat (400 BAD Request Error)

I try to push message to my group chat using message API.

I already invited my Chat bot to my group chat. and I get GroupID.

but it keeping occure 400 Bad request error.

here is my log message.

2019-01-02 09:02:22.261 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : --> POST https://api.line.me/v2/bot/message/push 2019-01-02 09:02:22.261 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : Content-Type: application/json; charset=UTF-8 2019-01-02 09:02:22.261 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : Content-Length: 222 2019-01-02 09:02:22.261 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : Authorization: Bearer R6l49a5+j7JoZ3JkBIIHYPqFerm59bsuUdTvSv1mqaIhQaKb68zTH6GPhtI7IZntUDi1Y3y/3VtLkujukQxg8SRRwD5a/i6/X1I6zTXGmEQIKdc3iTdI0W2g3l5QX+Qf0dC8Y0GjGMEjHbPANMdVgQdB04t89/1O/w1cDnyilFU= 2019-01-02 09:02:22.261 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : User-Agent: line-botsdk-java/2.3.0 2019-01-02 09:02:22.262 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : 2019-01-02 09:02:22.262 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : {"to":"Cb9de6bbde3ba398f4b33cdff7053b81a","messages":[{"type":"text","text":"\nTotal Memory : 314 MB\n Memory Used : 71 MB\n Memory Free : 242 MB\nPercent Used : 22.784986632427465%\nPercent Free : 77.21501336757254%\n"}]} 2019-01-02 09:02:22.262 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : --> END POST (222-byte body) 2019-01-02 09:02:22.957 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : <-- 400 Bad Request https://api.line.me/v2/bot/message/push (694ms) 2019-01-02 09:02:22.957 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : Server: nginx 2019-01-02 09:02:22.957 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : Content-Type: application/json;charset=UTF-8 2019-01-02 09:02:22.957 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : X-Line-Request-Id: ba3b5edc-1b19-4b60-8867-704ca7879eb9 2019-01-02 09:02:22.957 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : X-Content-Type-Options: nosniff 2019-01-02 09:02:22.957 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : X-XSS-Protection: 1; mode=block 2019-01-02 09:02:22.957 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : X-Frame-Options: DENY 2019-01-02 09:02:22.957 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : Content-Length: 37 2019-01-02 09:02:22.958 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : Expires: Wed, 02 Jan 2019 17:02:22 GMT 2019-01-02 09:02:22.958 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : Cache-Control: max-age=0, no-cache, no-store 2019-01-02 09:02:22.958 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : Pragma: no-cache 2019-01-02 09:02:22.958 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : Date: Wed, 02 Jan 2019 17:02:22 GMT 2019-01-02 09:02:22.958 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : Connection: close 2019-01-02 09:02:22.960 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : 2019-01-02 09:02:22.960 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : {"message":"Failed to send messages"} 2019-01-02 09:02:22.960 INFO 1045 --- [api.line.me/...] com.linecorp.bot.client.wire : <-- END HTTP (37-byte body)

  • 0
  • 2
  • 9999
  • twitter facebook

Hi all,

Apologies that this is such a newbie question.

I'ive invited my Chat bot to my group-chat. Now, as far as I understand, a GroupID will be generated and then sent to me. Where could I get this GroupID from, is there any notification somewhere?

Thanks!

  • 0

The UserId in "to":"Cb9de6bbde3ba398f4b33cdff7053b81a" looks suspicious. It usually starts with a "U"

  • 0
Are you sure? question.vm