Thanks for the heads-up regarding the documentation. It was updated accordingly.
The credentials for client_secrets.json comes from the Developer Console. You can follow these steps to obtain them (which are now listed at the documentation):
- Visit the Google apis console
- If this is your first time, click "Create project..."
- Otherwise, click on the drop down under the "Google apis" logo at the top left, and click "Create..." under "Other projects"
- Click on "API Access", and then on "Create an OAuth 2.0 Client ID...".
- Enter a product name and click "Next".
- Select "Installed application" and click "Create client ID".
- In the newly created "Client ID for installed applications", click "Download JSON" on the right side. Later on after you check out the sample project, you will copy this downloaded file (e.g. ~/Downloads/client_secrets.json) to src/main/resources/client_secrets.json. If you skip this step, when trying to run the sample you will get a 400 INVALID_CLIENT error in the browser.
Note that the link used above and in the documentation automatically asks if you want to activate the TaskQueue API, which is necessary. If you manually go to the API console, be sure to go to the services tab and turn that API on yourself.