LoginSignup
0
0

More than 1 year has passed since last update.

GASからCloud Storageにアクセスする

Last updated at Posted at 2022-01-06
  1. サービスアカウントの作成(作成済みのアカウントがある場合はIAMからロールを追加)
  2. apps-script-oauth2をライブラリに追加
  3. apps-script-oauth2/GoogleServiceAccount.gsを参考に認証部分を実装
  4. Cloud StorageのAPIリファレンスを参考に必要な機能を実装する

GASからCloud Storageに繋ぐまでの最小の流れだけ。

FAQ

Q. APIリクエスト時に403エラーが返ってきた
A. ロールが正しいか確認 & curlで問題ないか確認

参考

その他

GASからFirestoreを更新する場合は以下のライブラリが使いやすい。

GASからGoogleDriveは備わっているDrive APIを利用する。

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