-
Notifications
You must be signed in to change notification settings - Fork 360
API access on behalf of your clients (web flow)
Josh Radcliff edited this page Mar 10, 2023
·
4 revisions
This guide will walk you through how to setup OAuth2 for API access on behalf of your clients using web flow.
Follow the steps for the product you're using to generate a client ID and secret, then come back to this page.
If you authorizing on behalf of multiple users then you need to build OAuth2 sign-in flow into your application as part of adding OAuth2 support for your application. This involves three steps:
-
Implement an AbstractAuthorizationCodeServlet
See the authorization code flow here for more details.
-
Register the servlet's URL as a valid OAuth2 callback URL in the Developer Console.
-
Configure your AdsSession object to use the OAuth2 Credential.
You can refer to the advanced OAuth example for the product you're using for a full example: