Line Notifiに対し、cURLを使ってメッセージを送りたいと思っています。
curlから、
curl -X POST -H 'Authorization: Bearer ACCESSTOKEN' -F "message=aaa" 'https://notify-api.line.me/api/notify'
※ACCESSTOKENには、Line Notifyで取得したアクセストークンをセット
とコマンドを打つと、
curl:(6) Couldn't resolve host 'Bearer' curl:(6) Couldn't resolve host ACCESSTOKEN curl:(1) Protocol "'https" not supported or disabled in libcurl
となってしまいます。。。
ちなみに、curl --version と打つと、Protocols:と書かれた中に、httpsはあります。
エラーの表示に"'https"とあるので、'https://notify-api.line.me/api/notify'を囲むシングルくをーテーションがおかしいのかと思い、シングルクォーテーションを外してみると、
["status":401 "message":"Missing authorization header"]
というエラーに変わります。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。