OAuth 2.0 with Google Analytics API v3

前端 未结 5 1792
南旧
南旧 2020-12-02 11:53

I used to be able to query the Google Analytics API with my account\'s login & password. Google is now using OAuth for authentication which is great... The only issue is

5条回答
  •  有刺的猬
    2020-12-02 12:11

    You can use a refresh token. Store the refresh token in a db or secure config file, then use it to show the stats.

    Google API Offline Access Using OAuth 2.0 Refresh Token will give you an idea of how to capture then store your refresh token.

    See also Using OAuth 2.0 for Web Server Applications - Offline Access

提交回复
热议问题