概要 Rubyを使って、自動でGoogleシートに記述するプログラムを作成しましたが、その際にGoogle APIのトークンを取得するのに手間取りました。 こちらに詳しく情報をまとめましたので、参考にして頂ければ感謝です。 1.取得に使うGoogleアカウントでログイン 2.Google Developers Consoleにアクセス 3.API プロジェクトを作成 プロジェクト名を入れて、作成 4.左メニューのライブラリ -> 「Drive API」を選択 「有効にする」をクリック 「認証情報を作成」をクリック API を呼び出す場所を選択 アクセスするデータの種類を選択 「必要な認証情報」をクリック 承認済みのJavaScript生成と承認済みのリダイレクトURIに http://localhost と入力する。 ユーザーに表示するサービス名を入力 クライアント情報をダウンロード ダウ