LINEworksで、Google apps scriptを使ってbotで自動配信をしているのですが、LINEworksのAPIのアップグレードにあたりコードを書き換えました。
しかしエラーになり実行できず配信できません。
どなたかわかる方いましたらご教示いただきたいです。
修正後
function setOptions(){ // 自分の LINEWORKS アカウントの情報
return {
"CLIENT_ID" : "xxxxxxxxxxxxxxxxt",
"Client Secret" : "xxxxxxxxxxxxxxxx",
"Service Account " : "xxxxxxxxxxxxxxxx",
"privateKey" : "-----BEGIN PRIVATE KEY-----\nxxxxxxxxxxxxxxxx\n-----END PRIVATE KEY-----",
"botId" : xxxxxxxxxxxxxxxx,
};
}
function test() {
const domainId = "xxxxxxxxxxxxxxxx";
const roomId = "xxxxxxxxxxxxxxxx";
const msgText = "テスト";
LINEWORKS.sendMsgRoom(setOptions(), roomId, msgText)
}
修正前
function setOptions(){ // 自分の LINEWORKS アカウントの情報
return {
"apiId" : "",
"consumerKey" : "xxxxxxxxxxxxxxxx",
"serverId" : "xxxxxxxxxxxxxxxx",
"privateKey" : "-----BEGIN PRIVATE KEY-----\nxxxxxxxxxxxxxxxx\n-----END PRIVATE KEY-----",
"botNo" : xxxxxxxxxxxxxxxx,
};
}
function management() {
const domainId = "xxxxxxxxxxxxxxxx";
const roomId = "xxxxxxxxxxxxxxxx";
const msgText = "テスト";
LINEWORKS.sendMsgRoom(setOptions(), roomId, msgText)
}