Q&A

Why Line Message API Type PUSH always return bad request

Hi, I try to create push message to user 1:1 and then i create curl for test it by it stil return 400 bad request

curl -X POST \
-H 'Content-Type:application/json' \
-H 'Authorization: Bearer <channel access token>' \
-d '{
 "to": "Ucf633f17c6198XXXXXXXXXXXXXXXXX",
 "messages":[
      {
           "type":"text",
           "text":"Hello, user"
      }
  ]
}' https://api.line.me/v2/bot/message/push

Remark \ is backslash

reference : https://developers.line.biz/en/reference/messaging-api/#send-push-message

what i go wrong or missing ? Please help.

  • 1
  • 6
  • 245
  • twitter facebook

Does the account (Ucf633f17c6198XXXXXXXXXXXXXXXXX) added your bot (associated with channel access token) as a friend?

  • 1

Yes @矢崎

  • 1

Hi,

My problem shouldn't be related to V's problem, but it may be related if there is an issue on LINE's server.

I continue to get a 429 Error (statusText: 'Too Many Requests'), while making PUSH request, despite my monthly message is still at 489/500. My monthly number of requests is also still way below the limit of 100,000 requests per minute and 1,700 requests per second limit.

Is it possible that there is an issue with LINE's server?

Kindly help @@矢崎, many thanks!

  • 0

@v Did you check the response body?

  • 0

Hello

  • 0

I have a similar problem. Tried but got the message "Authorization header required. Must follow the scheme, 'Authorization: Bearer <ACCESS TOKEN>'". The same accss token and ID used in python code have no problem at all.

  • 0
本当によろしいですか? question.vm