Googleの様々なAPIを叩く際、認証にOAuth 2.0を用いる。 Using OAuth 2.0 to Access Google APIs | Google Identity Platform | Google Developers 使用する場面やパターンによって以下のような6つのシナリオが想定されている。 Login Web Server Applications Client-side Applications Installed Applications Devices Service Accounts 多くの場合は「ユーザごとに認証させて個別のtokenを発行しリクエストに利用する」という流れなのだけど、中にはたとえばURL短縮APIとか、必ずしもユーザ個別にtokenを発行させる必要がないこともある。 そういう場合には「サービス固有のtoken」だけあれば良い。と
![Heroku上からService Account認証でGoogle APIにアクセスする - すぎゃーんメモ](https://cdn-ak-scissors.b.st-hatena.com/image/square/6da516faf4656aaa56612f167c23caf6b17b2910/height=288;version=1;width=512/http%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fs%2Fsugyan%2F20130112%2F20130112213142.png)