0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Google API Refresh Tokenを取得するまで

Last updated at Posted at 2021-09-15

いつも調べるので、メモ

とりあえず↓これみとけ

↓をブラウザで開く

https://accounts.google.com/o/oauth2/auth?client_id=[クライアントID]&redirect_uri=http://localhost:3000&scope=[スコープ]&response_type=code&access_type=offline

※スコープが複数ある場合はスペース区切り

↓をcurl

上でリダイレクトされたクエリーパラメータのcodeをURLデコードして

curl -d client_id=[クライアントID] -d client_secret=[クライアントシークレット] -d redirect_uri=http://localhost:3000 -d grant_type=authorization_code -d code=[上で取得できたcode] https://accounts.google.com/o/oauth2/token
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?