0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

MessagingAPI×GASでしばらくすると認証が切れる問題

Posted at

MessagingAPIとスプレッドシートをGASで連携しているのですが、
1週間前後すると認証が切れて動かなくなってしまいます。
調べてみたもののこれといった解決策が見つからず試行錯誤していたのですが、
あるやり方で2週間耐えたので共有します。

起きている問題

MessagingAPIとGASを連携しているが、1週間前後するとLINEからの入力にうんともすんとも言わなくなる。
GASを再デプロイすることで再び動くようになる。

2週間耐えたやり方

初歩的なことな気がするんですけど、「スコープの追加」をしました。

GoogleCloudで問題のプロジェクトを選択して、
APIとサービス > OAuth同意画面 > データアクセス > スコープを追加または削除

必要なスコープを選択して完了。
選択したスコープはGASのデプロイの作成・表示・更新にかかわるもの、スプレッドシートの参照にかかわるもの。

その他試したこと

  • スタンドアロンにする
  • GoogleCloudで本番環境にpush
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?