Home>

I want to make a LINE bot that reminds me regularly with Google App Script (GAS).

Please write your question in detail here.

Error message

LINEbot can be created with the LINE Messaging API, but no matter how much GAS runs, LINEbot does not send text.

Error message
Applicable source code

var CHANNEL_ACCESS_TOKEN ='My access token&apos ;;
var USER_ID ='My user ID&apos ;;

function pushMessage () {
var postData = {
'to': USER_ID,
'messages': [{
'type&apos ;:'text&apos ;,
'text':'Good morning&apos ;,
}]
};

var url ='https: //api.line.me/v2/bot/message/push&apos ;;
var headers = {
'Content-Type&apos ;:'application/json&apos ;,
'Authorization&apos ;:'Bearer'+ CHANNEL_ACCESS_TOKEN,
};

var options = {
'method&apos ;:'post&apos ;,
'headers&apos ;: headers,
'payload': JSON.stringify (postData),
'muteHttpExceptions&apos ;: true
};

var response = UrlFetchApp.fetch (url, options);
}

Source code
Tried

Running immediately after reissuing the Webhook URL and access token

Supplemental information (FW/tool version etc.)