Re: Completed OAuth2 setup but still being asked for email and password pair
Okay, I have to admit that this was a schoolboy error on my behalf. The line ;[OAuth2] needs to be uncommented to signal the use of OAuth2 authentication. If I'd have used the file from code.google properly I'd have known this, rather than copying what I thought I needed. Muppet. https://code.google.com/p/google-api-adwords-php/source/browse/src/Google/Api/Ads/AdWords/auth.ini Thanks for everyone's help and apologies for any time wasting. On Tuesday, September 3, 2013 6:36:05 PM UTC, Alan Coleman wrote: > > Hello everyone, > > I have completed my OAuth2 set up but am still receiving errors asking for > the email and password pair. > > This was my process, as per the documentation: > > >1. Set up an application in the API Console >2. client_id and client_secret added to auth.ini >3. client_id and client_secret added to GetRefreshToken.php >4. Run GetRefreshToken.php through command line >5. Open the supplied URL in a browser after signing in to account >6. Accept when prompted >7. Copy Authorization code back into command line >8. Wait for refresh_token >9. Copy refresh_token into auth.ini >10. Run > > /adwords_api_php_4.5.1/examples/AdWords/v201302/BasicOperations/GetCampaigns.php > > > The following error is being returned to the browser: > > An error has occured: Validation failed for [email] with value []: email > is required and cannot be NULL. > > My auth.ini contains the following variables that are not coded out: > > >1. developerToken >2. userAgent >3. client_id >4. client_secret >5. refresh_token > > I simply can't believe I'm finding this so difficult, I've been hacking > away at it for weeks. > > As always, any help would be appreciated. > > Many thanks > > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Completed OAuth2 setup but still being asked for email and password pair
Are you sure your Refresh Token is still in the auth.ini file and that it's valid? Dig into the OAuth2Handler.php and you'll see the flow it expects. I still suggest you turn on logging and see if the logging sheds some light on it. What you're seeing now is just the default OAuth2Exception message and maybe the SOAP messages will have better debug info. On Wednesday, September 4, 2013 1:27:34 PM UTC-5, Alan Coleman wrote: > > Many Thanks Brett, > > I got hold of a fresh copy of the auth.ini file from here: > https://code.google.com/p/google-api-adwords-php/source/browse/src/Google/Api/Ads/AdWords/auth.ini > > It turns out I had [OAUTH2] Commented out, which would explain why the > api was asking for username and password, that makes sense. > > So I'm one step closer, now I'm just getting this error: > > Your OAuth2 Credentials are incorrect. Please see the GetRefreshToken.php > example. access_token required. > > Cheers! The saga continues. > > On Wednesday, September 4, 2013 5:56:40 PM UTC+1, Brett Baggott wrote: >> >> Alan, I'm not a PHP dev but I've taken a look at the PHP Client Library >> and it _seems_ you've gone through the right steps. I can't imagine why >> you'd get the email null error using OAuth2 verification if you've gone >> through the steps to get a valid refresh token. Maybe this would happen if >> the email address for your Application associated with the refresh token >> was blank but that couldn't be the case. >> >> Anyway, the best advice I can offer you is to turn on logging in your >> settings.ini file and see if the log file doesn't give you a better idea of >> what and where it's breaking. It's helped me solve seemingly unsolvable >> problems. >> >> Hope this helps, >> ~Brett >> >> On Tuesday, September 3, 2013 1:36:05 PM UTC-5, Alan Coleman wrote: >>> >>> Hello everyone, >>> >>> I have completed my OAuth2 set up but am still receiving errors asking >>> for the email and password pair. >>> >>> This was my process, as per the documentation: >>> >>> >>>1. Set up an application in the API Console >>>2. client_id and client_secret added to auth.ini >>>3. client_id and client_secret added to GetRefreshToken.php >>>4. Run GetRefreshToken.php through command line >>>5. Open the supplied URL in a browser after signing in to account >>>6. Accept when prompted >>>7. Copy Authorization code back into command line >>>8. Wait for refresh_token >>>9. Copy refresh_token into auth.ini >>>10. Run >>> >>> /adwords_api_php_4.5.1/examples/AdWords/v201302/BasicOperations/GetCampaigns.php >>> >>> >>> The following error is being returned to the browser: >>> >>> An error has occured: Validation failed for [email] with value []: email >>> is required and cannot be NULL. >>> >>> My auth.ini contains the following variables that are not coded out: >>> >>> >>>1. developerToken >>>2. userAgent >>>3. client_id >>>4. client_secret >>>5. refresh_token >>> >>> I simply can't believe I'm finding this so difficult, I've been hacking >>> away at it for weeks. >>> >>> As always, any help would be appreciated. >>> >>> Many thanks >>> >>> -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Completed OAuth2 setup but still being asked for email and password pair
Many Thanks Brett, I got hold of a fresh copy of the auth.ini file from here: https://code.google.com/p/google-api-adwords-php/source/browse/src/Google/Api/Ads/AdWords/auth.ini It turns out I had [OAUTH2] Commented out, which would explain why the api was asking for username and password, that makes sense. So I'm one step closer, now I'm just getting this error: Your OAuth2 Credentials are incorrect. Please see the GetRefreshToken.php example. access_token required. Cheers! The saga continues. On Wednesday, September 4, 2013 5:56:40 PM UTC+1, Brett Baggott wrote: > > Alan, I'm not a PHP dev but I've taken a look at the PHP Client Library > and it _seems_ you've gone through the right steps. I can't imagine why > you'd get the email null error using OAuth2 verification if you've gone > through the steps to get a valid refresh token. Maybe this would happen if > the email address for your Application associated with the refresh token > was blank but that couldn't be the case. > > Anyway, the best advice I can offer you is to turn on logging in your > settings.ini file and see if the log file doesn't give you a better idea of > what and where it's breaking. It's helped me solve seemingly unsolvable > problems. > > Hope this helps, > ~Brett > > On Tuesday, September 3, 2013 1:36:05 PM UTC-5, Alan Coleman wrote: >> >> Hello everyone, >> >> I have completed my OAuth2 set up but am still receiving errors asking >> for the email and password pair. >> >> This was my process, as per the documentation: >> >> >>1. Set up an application in the API Console >>2. client_id and client_secret added to auth.ini >>3. client_id and client_secret added to GetRefreshToken.php >>4. Run GetRefreshToken.php through command line >>5. Open the supplied URL in a browser after signing in to account >>6. Accept when prompted >>7. Copy Authorization code back into command line >>8. Wait for refresh_token >>9. Copy refresh_token into auth.ini >>10. Run >> >> /adwords_api_php_4.5.1/examples/AdWords/v201302/BasicOperations/GetCampaigns.php >> >> >> The following error is being returned to the browser: >> >> An error has occured: Validation failed for [email] with value []: email >> is required and cannot be NULL. >> >> My auth.ini contains the following variables that are not coded out: >> >> >>1. developerToken >>2. userAgent >>3. client_id >>4. client_secret >>5. refresh_token >> >> I simply can't believe I'm finding this so difficult, I've been hacking >> away at it for weeks. >> >> As always, any help would be appreciated. >> >> Many thanks >> >> -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Completed OAuth2 setup but still being asked for email and password pair
Alan, I'm not a PHP dev but I've taken a look at the PHP Client Library and it _seems_ you've gone through the right steps. I can't imagine why you'd get the email null error using OAuth2 verification if you've gone through the steps to get a valid refresh token. Maybe this would happen if the email address for your Application associated with the refresh token was blank but that couldn't be the case. Anyway, the best advice I can offer you is to turn on logging in your settings.ini file and see if the log file doesn't give you a better idea of what and where it's breaking. It's helped me solve seemingly unsolvable problems. Hope this helps, ~Brett On Tuesday, September 3, 2013 1:36:05 PM UTC-5, Alan Coleman wrote: > > Hello everyone, > > I have completed my OAuth2 set up but am still receiving errors asking for > the email and password pair. > > This was my process, as per the documentation: > > >1. Set up an application in the API Console >2. client_id and client_secret added to auth.ini >3. client_id and client_secret added to GetRefreshToken.php >4. Run GetRefreshToken.php through command line >5. Open the supplied URL in a browser after signing in to account >6. Accept when prompted >7. Copy Authorization code back into command line >8. Wait for refresh_token >9. Copy refresh_token into auth.ini >10. Run > > /adwords_api_php_4.5.1/examples/AdWords/v201302/BasicOperations/GetCampaigns.php > > > The following error is being returned to the browser: > > An error has occured: Validation failed for [email] with value []: email > is required and cannot be NULL. > > My auth.ini contains the following variables that are not coded out: > > >1. developerToken >2. userAgent >3. client_id >4. client_secret >5. refresh_token > > I simply can't believe I'm finding this so difficult, I've been hacking > away at it for weeks. > > As always, any help would be appreciated. > > Many thanks > > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Completed OAuth2 setup but still being asked for email and password pair
Hello everyone, I have completed my OAuth2 set up but am still receiving errors asking for the email and password pair. This was my process, as per the documentation: 1. Set up an application in the API Console 2. client_id and client_secret added to auth.ini 3. client_id and client_secret added to GetRefreshToken.php 4. Run GetRefreshToken.php through command line 5. Open the supplied URL in a browser after signing in to account 6. Accept when prompted 7. Copy Authorization code back into command line 8. Wait for refresh_token 9. Copy refresh_token into auth.ini 10. Run /adwords_api_php_4.5.1/examples/AdWords/v201302/BasicOperations/GetCampaigns.php The following error is being returned to the browser: An error has occured: Validation failed for [email] with value []: email is required and cannot be NULL. My auth.ini contains the following variables that are not coded out: 1. developerToken 2. userAgent 3. client_id 4. client_secret 5. refresh_token I simply can't believe I'm finding this so difficult, I've been hacking away at it for weeks. As always, any help would be appreciated. Many thanks -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.