https://github.com/takuya/ruby-oauth-google-gmail
https://github.com/takuya/ruby-oauth-google-gmail
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/takuya/ruby-oauth-google-gmail
- Owner: takuya
- License: agpl-3.0
- Created: 2022-03-14T07:23:35.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-09-09T15:06:14.000Z (almost 4 years ago)
- Last Synced: 2025-02-09T01:14:04.056Z (over 1 year ago)
- Language: Ruby
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ruby-oauth-google-gmail
GMail api を使うために Google Account をOAuthして、access_tokenを取得する
## start
```shell
bundle install
bundle exec ruby oauth-gmail-localhost.rb
```
## GCP のアプリケーション制限事項
認証情報→OAuthのDesktop クライアントを作成で、Client Secretは生成される。
CopyCodeでコピペで動かす方式は、非推奨になった。
`OOB_URI = "urn:ietf:wg:oauth:2.0:oob"`
```
bundle exec ruby oauth-gmail-copy-code.rb
```
ただし、OAuth同意画面で「内部」で「テスト」で「テストユーザ」を指定すると動く。
コピーコードで動かす場合の情報は、なかなかたどり着かないのでメモとして残す。