Q&A

Push message to single User

前提・実現したいこと

Notifi message to User user Line App to phone

発生している問題・エラーメッセージ

Error when send single message to User {"message":"Failed to send messages"} Use CURL to send https://developers.line.biz/en/reference/messaging-api/#send-push-message

Available APIs : REPLY_MESSAGE PUSH_MESSAGE

該当のソースコード

curl -v -X POST https://api.line.me/v2/bot/message/push -H 'Content-Type: application/json' -H 'Authorization: Bearer aK6S9yK5qfToJXn2lkp71bMjhqnAsXXsgJobHJXinHf6omxp/L2oDdVUm0CyEfPs6jf5hUJVoNpA12MqyIUh1GwtoDAXmEAjLpRCqJNU+gafwVfIT65HSHDwW7tKxU+kaa6jdniBdLqZEmgah+6oMQdB04t89/1O/w1cDnyilFU=' -d '{ "to": "U171c4b701767f285e5c087f943c9d2ec", "notificationDisabled": false, "messages":[ { "type":"text", "text":"Hello, world1" }, { "type":"text", "text":"Hello, world2" } ] }'

試したこと

補足情報(FW/ツールのバージョンなど)

  • 0
  • 1
  • 1172
  • twitter facebook

It seems missmatch userId. you can use userId gettign from webhook object at same provider channel.

https://developers.line.biz/en/reference/messaging-api/#common-properties

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