OAuth setup for Java client library

To authenticate as Google account users with access to Google Ads accounts, you must provide a set of OAuth credentials.

There are two OAuth flows that are generally used, the installed app and web app flows. The main difference is that installed apps must open the system browser and supply a local redirect URI to handle responses from Google's authorization server. Web applications can redirect an arbitrary 3P browser to complete authorization and send the credentials back to your server.

If you authenticate using your own credentials (installed app flow)

Refer to the OAuth Installed Application flow. This includes all the details you need for authenticating with your own credentials.

If you authenticate as a third-party Google user (web flow)

Refer to the OAuth Web Application flow. This gives an example of how to setup OAuth authentication for arbitrary third-party users.