I am trying to run the reporting example (DownloadCriteriaReport), and have been fighting my way through problems:
1) I am generating an access token with: $scope = "https://www.googleapis.com/auth/adwords"; $server = NULL; $handler = new SimpleOAuth2Handler($server, $scope); $credentials = array( 'client_id' => <my client id>, 'client_secret' =><my client secret>, ); $redirectURL = "https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=<CLIENT ID>&redirect_uri=<REDIRECT_URI>&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fadwords&access_type=offline" // Get the authorization code from the URL $code = $_GET['code']; $token_info = $handler->GetAccessToken($credentials, $code, $redirectURL); First problem: The token returned does not include a refresh token. I have "access_type=offline" specified. 2) I then turn to the sample "GetRefreshToken", because I know I need that. I had to play with this code to make it work, but I did get a refresh token back, which I saved into auth.ini. 3) I then try to run the reporting sample "DownloadCriteriaReport.php", and I get the error that my OAUTH token is invalid. I'm using the same authi.ini (with the new refresh token added, so the error confuses me. Any suggestions? thanks, andy -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at http://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/82164722-b90c-4c0e-adb6-ed3e69d5a9b6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
