OAuth2 – Get a Token Via REST Google Sign In

Every time I want to get an access token for a REST service for an integration test or other non-interactive use I forget how to go about it using OAuth and then have to piece it back together. My use case is wanting to give some headless process access to a user level service like Google Calendar. This post is now my permanent memory of how to do it, I hope it helps someone else. The Steps Get an account on the serviceDefine the client for OAuth access – example using a Google APIGet the code using an interactive request [Read on…]