Google Gmail API の使い方 - サンプルコード
(kibua20.tistory.com)Google の Gmail REST API および OAuth 2.0 の使い方についての説明です。Web server application として実装しており、各ステップごとの詳細な説明とあわせて Python のサンプルコードもあります。
Step 1: Google API Console で Gmail API を有効化し、Client を作成
-
Project を作成
-
API ライブラリを有効化
-
OAuth 同意画面を設定
-
ユーザー認証情報を構成
-
OAuth Client ID の結果を確認
Step 2. Google 認証サーバーで Authorization code を取得
-
Google サーバーに認証をリクエストする
-
Redirect URL を設定する
Step 3. Authorization code の値を使って Access token を取得
Step 4. Gmail API を使う: curl コマンドを確認し、Python code を作成
リンク) https://kibua20.tistory.com/70 (Step 1)
https://kibua20.tistory.com/80 (Step 2, Step 3)
https://kibua20.tistory.com/81 (Step 4)
まだコメントはありません。