Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Trouble on the quickstart using app script

オープン
#159 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
javascript
領域
api

調査の方向性

Issue にリンクされている Gmail API Apps Script quickstart から始め、提供されている listLabels 関数を使って失敗を再現します。サンプルの認証と Advanced Google Service の設定を確認し、観測されたスコープを quickstart の想定される動作と比較します。サンプルが insufficient-authentication-scopes エラーなしで実行できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Expected Behavior

Hey guys,

I followed tutorial on google app script quick start for gmail API here

What i'm getting in the app script is this

GoogleJsonResponseException: API call to gmail.users.labels.list failed with error: Request had insufficient authentication scopes. (line 5, file "Code")

The code followed is exactly the same as the tutorial, I also enabled gmail in Resources > Advance Google Service

/**
 * Lists the labels in the user's account.
 */
function listLabels() {
  var response = Gmail.Users.Labels.list('me');
  if (response.labels.length == 0) {
    Logger.log('No labels found.');
  } else {
    Logger.log('Labels:');
    for (var i = 0; i < response.labels.length; i++) {
      var label = response.labels[i];
      Logger.log('- %s', label.name);
    }
  }
}

I thought its going to be easier for me to integrate stuff in google ecosystem. Right now my other way is to create my own server and use node js to use gmail api. can anyone help me please?

Thanks

主要言語
JavaScript
スター
5.2k
フォーク
2k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

googleworkspace/apps-script-samples のほかの issue

googleworkspace/apps-script-samples の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。