Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private String devToken = "ZZZZZ";
- private String clientId = "AAA0BBB-XXXX-AAAAA";
- protected static String UserName = "a.v@h.c";
- protected static String Password = "********";
- // To get the initial access and refresh tokens you must call requestAccessAndRefreshTokens with the authorization redirection URL.
- OAuthTokens tokens = oAuthDesktopMobileAuthCodeGrant.requestAccessAndRefreshTokens(url);
- System.out.println("Access token: " + tokens.getAccessToken());
- System.out.println("Refresh token: " + tokens.getRefreshToken());
- authorizationData = new AuthorizationData();
- authorizationData.setDeveloperToken(getDevToken());
- authorizationData.setAuthentication(oAuthDesktopMobileAuthCodeGrant);
- customerServiceClient = new ServiceClient<>(authorizationData, ICustomerManagementService.class);
- ArrayOfAccount accounts = searchAccountsByUserId(user.getId());
- campaignServiceClient = new ServiceClient<>(authorizationData, ICampaignManagementService.class);
- GetAdsByAdGroupIdRequest cReq = new GetAdsByAdGroupIdRequest();
- cReq.setAdGroupId(1234567890L);
- campaignServiceClient.getService().getAdsByAdGroupId(cReq);
- The user does not represent a authorized developer.
- 106
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement