Hi,
But the steps are:
1. register your project to use OAuth 2.0 for native apps.
2. use the client id and secret in your app
3. run the app and you'll get a URL
4. go to the url, login as the user you want to grant access to
5. you will get an authorization code
6. go back to your app and use the authorization code
7. the api gives you an access token and a refresh token
8. You save both tokens.
9. You use the access token to get authorized access to the API. This access token lasts for a period of time. Once the token expores, the API will return a 401 status code.
10. When you see a 401, you have to use the refresh token to get a new access token.
11. You save the new access token
Steps 9, 10 and 11 are what your app needs to do on it's own so you can cron your app.
-Nick