Re: Failed to refresh access token. See inner exception for details.

2019-03-01 Thread Bob Bowles
I actually just found the problem 5 minutes ago and was about to update
this thread.   dependentAssembly entries had been removed from the web
app's web.config.  Once I added them back, everything ran fine.

On Fri, Mar 1, 2019 at 5:05 PM googleadsapi-forumadvisor via AdWords API
and Google Ads API Forum  wrote:

> Hello,
>
> As your same set of credentials are working with console app, could you
> please confirm that if your web app is pointing to the right property file?
> Also, you can try the CURL request provided below and see if you are able
> to generate the access token. If your credentials are correct, you should
> be able to generate an access token for the below CURL request.
>
> curl https://www.googleapis.com/oauth2/v4/token \
> -d refresh_token=your-refresh_token \
> -d client_id=your-client-id \
> -d client_secret=your-client-secret \
> -d grant_type=refresh_token
>
> Thanks,
> Milind, AdWords API Team
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> Also find us on our blog and discussion group:
> http://googleadsdeveloper.blogspot.com/search/label/adwords_api
> https://developers.google.com/adwords/api/community/
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>
> Was your question answered? Please rate your experience with us by taking
> a short survey.
> If not -- reply to this email and tell us what else we can do to help.
>
> Take Survey
> 
>
> Also find us on our blog and discussion group:
> http://googleadsdeveloper.blogspot.com/search/label/adwords_api
> https://developers.google.com/adwords/api/community/
>
> --
> --
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> Also find us on our blog:
> https://googleadsdeveloper.blogspot.com/
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>
> You received this message because you are subscribed to the Google
> Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to adwords-api+unsubscr...@googlegroups.com.
> Visit this group at https://groups.google.com/group/adwords-api.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/adwords-api/186v6h808qi0ga000oj6guy6omjcd9p68o30c1g68qj8c1k%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Bob Bowles

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/CAKaMDrsvitvrw3v8GfeV-eT%3D%3Df3P337fDz2HmKxjQwuBsX%2B04A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


RE: Failed to refresh access token. See inner exception for details.

2019-03-01 Thread googleadsapi-forumadvisor via AdWords API and Google Ads API Forum


Hello,

As your same set of credentials are working with console app, could you
please confirm that if your web app is pointing to the right property file?
Also, you can try the CURL request provided below and see if you are able
to generate the access token. If your credentials are correct, you should
be able to generate an access token for the below CURL request.

curl https://www.googleapis.com/oauth2/v4/token \
-d refresh_token=your-refresh_token \
-d client_id=your-client-id \
-d client_secret=your-client-secret \
-d grant_type=refresh_token

Thanks,
Milind, AdWords API Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/186v6h808qi0ga000oj6guy6omjcd9p68o30c1g68qj8c1k%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Failed to refresh access token. See inner exception for details.

2019-03-01 Thread Bob Bowles
UPDATE: The errors are happening when a user performs a function in our 
admin web app that makes calls to the AdWords API.  We also have a console 
app that runs automated updates on a daily basis.  The console app is not 
having any problems.  Just the web app.  Both apps have always used the 
identical code and credentials.

On Friday, March 1, 2019 at 12:11:49 PM UTC-5, Bob Bowles wrote:
>
> Today,  we started receiving "Failed to refresh access token. See inner 
> exception for details." on all AdWords API calls.  We did not make any code 
> changes.  This just started out of the blue. We tried generating new 
> credentials and a new refresh token but still get the same error.  We have 
> been using the AdWords API for years without issue and then suddenly this 
> problem.  Does anyone have a suggestion?
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/d18a9b91-44f4-4618-a88d-af467116479d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Failed to refresh access token. See inner exception for details.

2018-11-21 Thread 'Nadine Sundquist (AdWords API Team)' via AdWords API and Google Ads API Forum
Hello,

This is a pretty old thread from what it appears to be someone else. Could 
you please start a new thread with your information, so we can best help 
you and make sure your issue doesn't get confused with someone else's?

Thanks,
Nadine, AdWords API Team

On Wednesday, November 21, 2018 at 12:59:32 AM UTC-5, vibh...@whisskers.com 
wrote:
>
>
>
> On Thursday, August 16, 2018 at 11:03:37 PM UTC+5:30, rentca...@gmail.com 
> wrote:
>>
>> Hi,
>>
>> I'm getting error "Failed to refresh access token. See inner exception 
>> for details." when I try to get campaign information.  The line of code 
>> is page = campaignService.get(selector) where page = "CampaignPage".  This 
>> process works when I use it in a web application but not when I use it in a 
>> windows service.  Below is some information that I hope will be helpful in 
>> figuring out the problem.  I was not able to get the logging working in the 
>> windows service.
>>
>> CampaignService
>> {Google.Api.Ads.AdWords.v201806.CampaignService}
>> Channel: {System.Runtime.Remoting.Proxies.__TransparentProxy}
>> ChannelFactory: {System.ServiceModel.ChannelFactory(Of 
>> Google.Api.Ads.AdWords.v201806.ICampaignService)}
>> ClientCredentials: {System.ServiceModel.Description.ClientCredentials}
>> EnableDecompression: True
>> Endpoint: Address={
>> https://adwords.google.com/api/adwords/cm/v201806/CampaignService}
>> InnerChannel: {System.Runtime.Remoting.Proxies.__TransparentProxy}
>> Proxy: {System.Net.WebRequest.WebProxyWrapper}
>> RequestHeader: {https://adwords.google.com/api/adwords/cm/v201806";>
>>   Replace for security
>>   Replace for security
>>   
>> }
>> ResponseHeader: Nothing
>> Signature: {Google.Api.Ads.AdWords.Lib.AdWordsServiceSignature}
>> State: Created {0}
>> Timeout: 0
>> Url: "
>> https://adwords.google.com/api/adwords/cm/v201806/CampaignService";
>> User: {Google.Api.Ads.AdWords.Lib.AdWordsUser}
>> UserAgent: Nothing
>>
>> CampaignService.User.Config
>> {Google.Api.Ads.AdWords.Lib.AdWordsAppConfig}
>> AdWordsApiServer: "https://adwords.google.com";
>> ClientCustomerId: "Replace for security"
>> DeveloperToken: "Replace for security"
>> EnableGzipCompression: True
>> GMBLoginEmail: ""
>> GMBOAuth2RefreshToken: ""
>> IncludeUtilitiesInUserAgent: False
>> IncludeZeroImpressions: Nothing
>> MaskCredentials: True
>> MerchantCenterId: 0
>> OAuth2AccessToken: ""
>> OAuth2ClientId: "Replace for security"
>> OAuth2ClientSecret: "Replace for security"
>> OAuth2Mode: APPLICATION {0}
>> OAuth2PrivateKey: ""
>> OAuth2PrnEmail: ""
>> OAuth2RedirectUri: "Replace for security"
>> OAuth2RefreshToken: "Replace for security"
>> OAuth2Scope: "https://www.googleapis.com/auth/adwords";
>> OAuth2SecretsJsonPath: ""
>> OAuth2ServerUrl: "https://accounts.google.com";
>> OAuth2ServiceAccountEmail: Nothing
>> Proxy: Nothing
>> RetryCount: 0
>> Signature: "AwApi-DotNet/23.6.0, Common-Dotnet/9.4.0, .NET 
>> CLR/4.0.30319.42000, "
>> SkipColumnHeader: False
>> SkipReportHeader: False
>> SkipReportSummary: False
>> Timeout: 60
>> UnixTimestamp: 1534434608
>> UseRawEnumValues: Nothing
>> UserAgent: "Replace for security"
>>
>> selector
>> {Google.Api.Ads.AdWords.v201806.Selector}
>> dateRange: {Google.Api.Ads.AdWords.v201806.DateRange}
>> fields: {Length=7}
>> ordering: Nothing
>> paging: {LIMIT 0, 500}
>> predicates: Nothing
>> ?selector.fields
>> {Length=7}
>> (0): "Id"
>> (1): "Name"
>> (2): "Status"
>> (3): "StartDate"
>> (4): "EndDate"
>> (5): "BaseCampaignId"
>> (6): "AdvertisingChannelType"
>>
>> {"Failed to refresh access token. See inner exception for details."}
>> at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean 
>> includeTaskCanceledExceptions)
>> at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, 
>> CancellationToken cancellationToken) 
>> at 
>> Google.Api.Ads.Common.OAuth.AdsOAuthProviderImpl.GetAccessTokenForAuthorizationCodeFlow()
>>   
>> at 
>> Google.Api.Ads.Common.OAuth.AdsOAuthProviderImpl.RefreshAccessTokenInOfflineMode()
>>
>> Error Occurred Message: Failed to retrieve campaign(s). Stack Trace:
>> at YSI.Ads.GoogleAdwordsHelper.GetListOfCampaigns(String during, DateTime 
>> startDate, DateTime endDate) in 
>> C:\TFS\Cafés\yCPC\Source\GoogleAdwords.vb:line 1711   at 
>> YSI.Cafe.RC.SiteManager.AdWordsAutomatedTasks.ImportAdwordsCampaigns() in 
>> C:\TFS\Cafés\RentCafe\Source\ManagerCafe\AppClasses\AdWordsAutomatedTasks.vb:line
>>  
>> 337   at RCDaily.AdwordsImportCampaignRoutine.ImportAdwordsCampaigns() in 
>> C:\TFS\Cafés\RentCafe\Source\RCDaily\AdwordsImportCampaignsTasks.vb:line 
>> 33   at RCDaily.AdwordsImportCampaignRoutine.OnExecute(IJobExecutionContext 
>> context) in 
>> C:\TFS\Cafés\RentCafe\Source\RCDaily\AdwordsImportCampaignsTasks.vb:line 
>> 27   at RCDaily.yJob.

Re: Failed to refresh access token. See inner exception for details.

2018-08-20 Thread 'Nadine Sundquist (AdWords API Team)' via AdWords API and Google Ads API Forum
Hello KDJ,

This was sent over to me since I've worked quite a bit with more complex 
configurations. You mentioned in your last message that you're using a 
different config file with the same credentials. Can we just for a sanity 
check make sure that all those credentials are working properly?

>From the command line, try this with your refresh token and client 
information to get an access token back, where you substitute your values 
from your config file:

curl --data 
"refresh_token=&client_id=&client_secret=&grant_type=refresh_token"
 
-X POST "https://www.googleapis.com/oauth2/v3/token";

With that access token, get the debug information for me, just in case 
something does go wrong later by putting this in your browser:

https:
//www.googleapis.com/oauth2/v3/tokeninfo?access_token=

Save off that information for me in case something goes wrong in this next 
command line. 
With that access token, try this:

curl --header "Authorization: Bearer " --header 
"developerToken: 
" --header "clientCustomerId: 
" --header "clientSecret: 
" 
https://adwords.google.com/api/adwords/reportdownload/v201806 
--data "__rdquery=SELECT CampaignName, Impressions FROM 
CAMPAIGN_PERFORMANCE_REPORT DURING LAST_MONTH&__fmt=CSV"

If anything does not work, then please, in the forum, click on the drop 
down in this message and say* Reply privately to author *with this 
information. If you're only working in Windows, there are alternatives to 
curl that you can use on Windows.

If everything is working in these commands, and you're still having issues, 
then please send me the request ID of the request that failed. If you don't 
have that, then please send me the customer ID by replying privately to the 
author on the forum. I can try to look up your request on our servers to 
see if I have more information here on what exactly failed.

Best,
Nadine, AdWords API Team

On Friday, August 17, 2018 at 6:01:37 PM UTC-4, rentcafed...@gmail.com 
wrote:
>
> Sai,
>
> I have verified that my windows service is using a separate config file.  
> I have also verified that the web application and the windows service are 
> using the same credentials.  The web application and the windows service 
> call the same dll which makes the call to the Adwords API.  Do you have any 
> other suggestions?
>
> KDJ
>
> On Friday, August 17, 2018 at 12:45:34 PM UTC-7, Teja Makani wrote:
>>
>> Hello,
>>
>> Thanks for the details, since the API call is working good for web 
>> application, you might need to check how the windows service is pulling the 
>> credentials and passing it to client libraries. Ideally, the same 
>> credentials should work provided everything else (user making the call, 
>> account etc.,) is same in both the applications. Could you please verify if 
>> there is a separate config file for windows service? Please give it a try 
>> and let me know if the problem still persists.
>>
>> Regards,
>> Sai Teja, AdWords API Team.
>>
>> On Thursday, August 16, 2018 at 1:33:37 PM UTC-4, rentca...@gmail.com 
>> wrote:
>>>
>>> Hi,
>>>
>>> I'm getting error "Failed to refresh access token. See inner exception 
>>> for details." when I try to get campaign information.  The line of code 
>>> is page = campaignService.get(selector) where page = "CampaignPage".  This 
>>> process works when I use it in a web application but not when I use it in a 
>>> windows service.  Below is some information that I hope will be helpful in 
>>> figuring out the problem.  I was not able to get the logging working in the 
>>> windows service.
>>>
>>> CampaignService
>>> {Google.Api.Ads.AdWords.v201806.CampaignService}
>>> Channel: {System.Runtime.Remoting.Proxies.__TransparentProxy}
>>> ChannelFactory: {System.ServiceModel.ChannelFactory(Of 
>>> Google.Api.Ads.AdWords.v201806.ICampaignService)}
>>> ClientCredentials: 
>>> {System.ServiceModel.Description.ClientCredentials}
>>> EnableDecompression: True
>>> Endpoint: Address={
>>> https://adwords.google.com/api/adwords/cm/v201806/CampaignService}
>>> InnerChannel: {System.Runtime.Remoting.Proxies.__TransparentProxy}
>>> Proxy: {System.Net.WebRequest.WebProxyWrapper}
>>> RequestHeader: {https://adwords.google.com/api/adwords/cm/v201806";>
>>>   Replace for security
>>>   Replace for security
>>>   
>>> }
>>> ResponseHeader: Nothing
>>> Signature: {Google.Api.Ads.AdWords.Lib.AdWordsServiceSignature}
>>> State: Created {0}
>>> Timeout: 0
>>> Url: "
>>> https://adwords.google.com/api/adwords/cm/v201806/CampaignService";
>>> User: {Google.Api.Ads.AdWords.Lib.AdWordsUser}
>>> UserAgent: Nothing
>>>
>>> CampaignService.User.Config
>>> {Google.Api.Ads.AdWords.Lib.AdWordsAppConfig}
>>> AdWordsApiServer: "https://adwords.google.com";
>>> ClientCustomerId: "Replace for security"
>>> DeveloperToken: "Replace for security"
>>> EnableGzipCompression: True
>>> GMBLoginEmail: ""
>>> GMBOAuth2RefreshToken: ""
>>> IncludeUtilitiesInUserAgent: Fa

Re: Failed to refresh access token. See inner exception for details.

2018-08-17 Thread rentcafedev1
Sai,

I have verified that my windows service is using a separate config file.  I 
have also verified that the web application and the windows service are 
using the same credentials.  The web application and the windows service 
call the same dll which makes the call to the Adwords API.  Do you have any 
other suggestions?

KDJ

On Friday, August 17, 2018 at 12:45:34 PM UTC-7, Teja Makani wrote:
>
> Hello,
>
> Thanks for the details, since the API call is working good for web 
> application, you might need to check how the windows service is pulling the 
> credentials and passing it to client libraries. Ideally, the same 
> credentials should work provided everything else (user making the call, 
> account etc.,) is same in both the applications. Could you please verify if 
> there is a separate config file for windows service? Please give it a try 
> and let me know if the problem still persists.
>
> Regards,
> Sai Teja, AdWords API Team.
>
> On Thursday, August 16, 2018 at 1:33:37 PM UTC-4, rentca...@gmail.com 
> wrote:
>>
>> Hi,
>>
>> I'm getting error "Failed to refresh access token. See inner exception 
>> for details." when I try to get campaign information.  The line of code 
>> is page = campaignService.get(selector) where page = "CampaignPage".  This 
>> process works when I use it in a web application but not when I use it in a 
>> windows service.  Below is some information that I hope will be helpful in 
>> figuring out the problem.  I was not able to get the logging working in the 
>> windows service.
>>
>> CampaignService
>> {Google.Api.Ads.AdWords.v201806.CampaignService}
>> Channel: {System.Runtime.Remoting.Proxies.__TransparentProxy}
>> ChannelFactory: {System.ServiceModel.ChannelFactory(Of 
>> Google.Api.Ads.AdWords.v201806.ICampaignService)}
>> ClientCredentials: {System.ServiceModel.Description.ClientCredentials}
>> EnableDecompression: True
>> Endpoint: Address={
>> https://adwords.google.com/api/adwords/cm/v201806/CampaignService}
>> InnerChannel: {System.Runtime.Remoting.Proxies.__TransparentProxy}
>> Proxy: {System.Net.WebRequest.WebProxyWrapper}
>> RequestHeader: {https://adwords.google.com/api/adwords/cm/v201806";>
>>   Replace for security
>>   Replace for security
>>   
>> }
>> ResponseHeader: Nothing
>> Signature: {Google.Api.Ads.AdWords.Lib.AdWordsServiceSignature}
>> State: Created {0}
>> Timeout: 0
>> Url: "
>> https://adwords.google.com/api/adwords/cm/v201806/CampaignService";
>> User: {Google.Api.Ads.AdWords.Lib.AdWordsUser}
>> UserAgent: Nothing
>>
>> CampaignService.User.Config
>> {Google.Api.Ads.AdWords.Lib.AdWordsAppConfig}
>> AdWordsApiServer: "https://adwords.google.com";
>> ClientCustomerId: "Replace for security"
>> DeveloperToken: "Replace for security"
>> EnableGzipCompression: True
>> GMBLoginEmail: ""
>> GMBOAuth2RefreshToken: ""
>> IncludeUtilitiesInUserAgent: False
>> IncludeZeroImpressions: Nothing
>> MaskCredentials: True
>> MerchantCenterId: 0
>> OAuth2AccessToken: ""
>> OAuth2ClientId: "Replace for security"
>> OAuth2ClientSecret: "Replace for security"
>> OAuth2Mode: APPLICATION {0}
>> OAuth2PrivateKey: ""
>> OAuth2PrnEmail: ""
>> OAuth2RedirectUri: "Replace for security"
>> OAuth2RefreshToken: "Replace for security"
>> OAuth2Scope: "https://www.googleapis.com/auth/adwords";
>> OAuth2SecretsJsonPath: ""
>> OAuth2ServerUrl: "https://accounts.google.com";
>> OAuth2ServiceAccountEmail: Nothing
>> Proxy: Nothing
>> RetryCount: 0
>> Signature: "AwApi-DotNet/23.6.0, Common-Dotnet/9.4.0, .NET 
>> CLR/4.0.30319.42000, "
>> SkipColumnHeader: False
>> SkipReportHeader: False
>> SkipReportSummary: False
>> Timeout: 60
>> UnixTimestamp: 1534434608
>> UseRawEnumValues: Nothing
>> UserAgent: "Replace for security"
>>
>> selector
>> {Google.Api.Ads.AdWords.v201806.Selector}
>> dateRange: {Google.Api.Ads.AdWords.v201806.DateRange}
>> fields: {Length=7}
>> ordering: Nothing
>> paging: {LIMIT 0, 500}
>> predicates: Nothing
>> ?selector.fields
>> {Length=7}
>> (0): "Id"
>> (1): "Name"
>> (2): "Status"
>> (3): "StartDate"
>> (4): "EndDate"
>> (5): "BaseCampaignId"
>> (6): "AdvertisingChannelType"
>>
>> {"Failed to refresh access token. See inner exception for details."}
>> at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean 
>> includeTaskCanceledExceptions)
>> at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, 
>> CancellationToken cancellationToken) 
>> at 
>> Google.Api.Ads.Common.OAuth.AdsOAuthProviderImpl.GetAccessTokenForAuthorizationCodeFlow()
>>   
>> at 
>> Google.Api.Ads.Common.OAuth.AdsOAuthProviderImpl.RefreshAccessTokenInOfflineMode()
>>
>> Error Occurred Message: Failed to retrieve campaign(s). Stack Trace:
>> at YSI.Ads.GoogleAdwordsHelper.GetListOfCampaigns(String during, DateTime 
>> startDate, DateT

Re: Failed to refresh access token. See inner exception for details.

2018-08-17 Thread 'Teja Makani' via AdWords API and Google Ads API Forum
Hello,

Thanks for the details, since the API call is working good for web 
application, you might need to check how the windows service is pulling the 
credentials and passing it to client libraries. Ideally, the same 
credentials should work provided everything else (user making the call, 
account etc.,) is same in both the applications. Could you please verify if 
there is a separate config file for windows service? Please give it a try 
and let me know if the problem still persists.

Regards,
Sai Teja, AdWords API Team.

On Thursday, August 16, 2018 at 1:33:37 PM UTC-4, rentca...@gmail.com wrote:
>
> Hi,
>
> I'm getting error "Failed to refresh access token. See inner exception for 
> details." when I try to get campaign information.  The line of code is page 
> = campaignService.get(selector) where page = "CampaignPage".  This process 
> works when I use it in a web application but not when I use it in a windows 
> service.  Below is some information that I hope will be helpful in figuring 
> out the problem.  I was not able to get the logging working in the windows 
> service.
>
> CampaignService
> {Google.Api.Ads.AdWords.v201806.CampaignService}
> Channel: {System.Runtime.Remoting.Proxies.__TransparentProxy}
> ChannelFactory: {System.ServiceModel.ChannelFactory(Of 
> Google.Api.Ads.AdWords.v201806.ICampaignService)}
> ClientCredentials: {System.ServiceModel.Description.ClientCredentials}
> EnableDecompression: True
> Endpoint: Address={
> https://adwords.google.com/api/adwords/cm/v201806/CampaignService}
> InnerChannel: {System.Runtime.Remoting.Proxies.__TransparentProxy}
> Proxy: {System.Net.WebRequest.WebProxyWrapper}
> RequestHeader: {https://adwords.google.com/api/adwords/cm/v201806";>
>   Replace for security
>   Replace for security
>   
> }
> ResponseHeader: Nothing
> Signature: {Google.Api.Ads.AdWords.Lib.AdWordsServiceSignature}
> State: Created {0}
> Timeout: 0
> Url: "
> https://adwords.google.com/api/adwords/cm/v201806/CampaignService";
> User: {Google.Api.Ads.AdWords.Lib.AdWordsUser}
> UserAgent: Nothing
>
> CampaignService.User.Config
> {Google.Api.Ads.AdWords.Lib.AdWordsAppConfig}
> AdWordsApiServer: "https://adwords.google.com";
> ClientCustomerId: "Replace for security"
> DeveloperToken: "Replace for security"
> EnableGzipCompression: True
> GMBLoginEmail: ""
> GMBOAuth2RefreshToken: ""
> IncludeUtilitiesInUserAgent: False
> IncludeZeroImpressions: Nothing
> MaskCredentials: True
> MerchantCenterId: 0
> OAuth2AccessToken: ""
> OAuth2ClientId: "Replace for security"
> OAuth2ClientSecret: "Replace for security"
> OAuth2Mode: APPLICATION {0}
> OAuth2PrivateKey: ""
> OAuth2PrnEmail: ""
> OAuth2RedirectUri: "Replace for security"
> OAuth2RefreshToken: "Replace for security"
> OAuth2Scope: "https://www.googleapis.com/auth/adwords";
> OAuth2SecretsJsonPath: ""
> OAuth2ServerUrl: "https://accounts.google.com";
> OAuth2ServiceAccountEmail: Nothing
> Proxy: Nothing
> RetryCount: 0
> Signature: "AwApi-DotNet/23.6.0, Common-Dotnet/9.4.0, .NET 
> CLR/4.0.30319.42000, "
> SkipColumnHeader: False
> SkipReportHeader: False
> SkipReportSummary: False
> Timeout: 60
> UnixTimestamp: 1534434608
> UseRawEnumValues: Nothing
> UserAgent: "Replace for security"
>
> selector
> {Google.Api.Ads.AdWords.v201806.Selector}
> dateRange: {Google.Api.Ads.AdWords.v201806.DateRange}
> fields: {Length=7}
> ordering: Nothing
> paging: {LIMIT 0, 500}
> predicates: Nothing
> ?selector.fields
> {Length=7}
> (0): "Id"
> (1): "Name"
> (2): "Status"
> (3): "StartDate"
> (4): "EndDate"
> (5): "BaseCampaignId"
> (6): "AdvertisingChannelType"
>
> {"Failed to refresh access token. See inner exception for details."}
> at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean 
> includeTaskCanceledExceptions)
> at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, 
> CancellationToken cancellationToken) 
> at 
> Google.Api.Ads.Common.OAuth.AdsOAuthProviderImpl.GetAccessTokenForAuthorizationCodeFlow()
>   
> at 
> Google.Api.Ads.Common.OAuth.AdsOAuthProviderImpl.RefreshAccessTokenInOfflineMode()
>
> Error Occurred Message: Failed to retrieve campaign(s). Stack Trace:at 
> YSI.Ads.GoogleAdwordsHelper.GetListOfCampaigns(String during, DateTime 
> startDate, DateTime endDate) in 
> C:\TFS\Cafés\yCPC\Source\GoogleAdwords.vb:line 1711   at 
> YSI.Cafe.RC.SiteManager.AdWordsAutomatedTasks.ImportAdwordsCampaigns() in 
> C:\TFS\Cafés\RentCafe\Source\ManagerCafe\AppClasses\AdWordsAutomatedTasks.vb:line
>  
> 337   at RCDaily.AdwordsImportCampaignRoutine.ImportAdwordsCampaigns() in 
> C:\TFS\Cafés\RentCafe\Source\RCDaily\AdwordsImportCampaignsTasks.vb:line 
> 33   at RCDaily.AdwordsImportCampaignRoutine.OnExecute(IJobExecutionContext 
> context) in 
> C:\TFS\Cafés\RentCafe\Source\RCDaily\Adwor

Re: Failed to refresh access token. See inner exception for details.

2018-08-16 Thread rentcafedev1
Sai Teja,

We are you VB.net library to make this call.  

As I mention in my previous email the call work fine with I'm making it 
through a web application, it just does not work when I make the call from 
a windows service.  Please note:  Both web application and the windows 
service hit the same code to make the call.  I should not need to generate 
a new refresh token since it works from my web application.

Please advise!

KDJ

On Thursday, August 16, 2018 at 2:53:49 PM UTC-7, Teja Makani wrote:
>
> Hello,
>
> Could you please confirm whether you are using AdWords .NET client library 
>  for this call? If not 
> could you please share the code snippet that is making the call? You could 
> also cross verify that you are following the steps required to make API 
> call from here 
> .
>
> Also, to verify that your credentials are correct, you could try the CURL 
> request provided below and see if you are able to generate the access 
> token. If your credentials are correct, you should be able to generate an 
> access token for the below CURL request.
>
> curl https://www.googleapis.com/oauth2/v4/token \
> -d refresh_token=your-refresh_token \
> -d client_id=your-client-id \
> -d client_secret=your-client-secret \
> -d grant_type=refresh_token
>
> If your credentials are incorrect or still facing issue then you could try 
> generating a new refresh token with the help of this guide 
> 
>  and 
> retry your request. 
>
> Regards,
> Sai Teja, AdWords API Team.
>
> On Thursday, August 16, 2018 at 1:33:37 PM UTC-4, rentca...@gmail.com 
> wrote:
>>
>> Hi,
>>
>> I'm getting error "Failed to refresh access token. See inner exception 
>> for details." when I try to get campaign information.  The line of code 
>> is page = campaignService.get(selector) where page = "CampaignPage".  This 
>> process works when I use it in a web application but not when I use it in a 
>> windows service.  Below is some information that I hope will be helpful in 
>> figuring out the problem.  I was not able to get the logging working in the 
>> windows service.
>>
>> CampaignService
>> {Google.Api.Ads.AdWords.v201806.CampaignService}
>> Channel: {System.Runtime.Remoting.Proxies.__TransparentProxy}
>> ChannelFactory: {System.ServiceModel.ChannelFactory(Of 
>> Google.Api.Ads.AdWords.v201806.ICampaignService)}
>> ClientCredentials: {System.ServiceModel.Description.ClientCredentials}
>> EnableDecompression: True
>> Endpoint: Address={
>> https://adwords.google.com/api/adwords/cm/v201806/CampaignService}
>> InnerChannel: {System.Runtime.Remoting.Proxies.__TransparentProxy}
>> Proxy: {System.Net.WebRequest.WebProxyWrapper}
>> RequestHeader: {https://adwords.google.com/api/adwords/cm/v201806";>
>>   Replace for security
>>   Replace for security
>>   
>> }
>> ResponseHeader: Nothing
>> Signature: {Google.Api.Ads.AdWords.Lib.AdWordsServiceSignature}
>> State: Created {0}
>> Timeout: 0
>> Url: "
>> https://adwords.google.com/api/adwords/cm/v201806/CampaignService";
>> User: {Google.Api.Ads.AdWords.Lib.AdWordsUser}
>> UserAgent: Nothing
>>
>> CampaignService.User.Config
>> {Google.Api.Ads.AdWords.Lib.AdWordsAppConfig}
>> AdWordsApiServer: "https://adwords.google.com";
>> ClientCustomerId: "Replace for security"
>> DeveloperToken: "Replace for security"
>> EnableGzipCompression: True
>> GMBLoginEmail: ""
>> GMBOAuth2RefreshToken: ""
>> IncludeUtilitiesInUserAgent: False
>> IncludeZeroImpressions: Nothing
>> MaskCredentials: True
>> MerchantCenterId: 0
>> OAuth2AccessToken: ""
>> OAuth2ClientId: "Replace for security"
>> OAuth2ClientSecret: "Replace for security"
>> OAuth2Mode: APPLICATION {0}
>> OAuth2PrivateKey: ""
>> OAuth2PrnEmail: ""
>> OAuth2RedirectUri: "Replace for security"
>> OAuth2RefreshToken: "Replace for security"
>> OAuth2Scope: "https://www.googleapis.com/auth/adwords";
>> OAuth2SecretsJsonPath: ""
>> OAuth2ServerUrl: "https://accounts.google.com";
>> OAuth2ServiceAccountEmail: Nothing
>> Proxy: Nothing
>> RetryCount: 0
>> Signature: "AwApi-DotNet/23.6.0, Common-Dotnet/9.4.0, .NET 
>> CLR/4.0.30319.42000, "
>> SkipColumnHeader: False
>> SkipReportHeader: False
>> SkipReportSummary: False
>> Timeout: 60
>> UnixTimestamp: 1534434608
>> UseRawEnumValues: Nothing
>> UserAgent: "Replace for security"
>>
>> selector
>> {Google.Api.Ads.AdWords.v201806.Selector}
>> dateRange: {Google.Api.Ads.AdWords.v201806.DateRange}
>> fields: {Length=7}
>> ordering: Nothing
>> paging: {LIMIT 0, 500}
>> predicates: Nothing
>> ?selector.fields
>> {Length=7}
>> (0): "Id"
>> (1): "Name"
>> (2):

Re: Failed to refresh access token. See inner exception for details.

2018-08-16 Thread 'Teja Makani' via AdWords API and Google Ads API Forum
Hello,

Could you please confirm whether you are using AdWords .NET client library 
 for this call? If not 
could you please share the code snippet that is making the call? You could 
also cross verify that you are following the steps required to make API 
call from here 
.

Also, to verify that your credentials are correct, you could try the CURL 
request provided below and see if you are able to generate the access 
token. If your credentials are correct, you should be able to generate an 
access token for the below CURL request.

curl https://www.googleapis.com/oauth2/v4/token \
-d refresh_token=your-refresh_token \
-d client_id=your-client-id \
-d client_secret=your-client-secret \
-d grant_type=refresh_token

If your credentials are incorrect or still facing issue then you could try 
generating a new refresh token with the help of this guide 

 and 
retry your request. 

Regards,
Sai Teja, AdWords API Team.

On Thursday, August 16, 2018 at 1:33:37 PM UTC-4, rentca...@gmail.com wrote:
>
> Hi,
>
> I'm getting error "Failed to refresh access token. See inner exception for 
> details." when I try to get campaign information.  The line of code is page 
> = campaignService.get(selector) where page = "CampaignPage".  This process 
> works when I use it in a web application but not when I use it in a windows 
> service.  Below is some information that I hope will be helpful in figuring 
> out the problem.  I was not able to get the logging working in the windows 
> service.
>
> CampaignService
> {Google.Api.Ads.AdWords.v201806.CampaignService}
> Channel: {System.Runtime.Remoting.Proxies.__TransparentProxy}
> ChannelFactory: {System.ServiceModel.ChannelFactory(Of 
> Google.Api.Ads.AdWords.v201806.ICampaignService)}
> ClientCredentials: {System.ServiceModel.Description.ClientCredentials}
> EnableDecompression: True
> Endpoint: Address={
> https://adwords.google.com/api/adwords/cm/v201806/CampaignService}
> InnerChannel: {System.Runtime.Remoting.Proxies.__TransparentProxy}
> Proxy: {System.Net.WebRequest.WebProxyWrapper}
> RequestHeader: {https://adwords.google.com/api/adwords/cm/v201806";>
>   Replace for security
>   Replace for security
>   
> }
> ResponseHeader: Nothing
> Signature: {Google.Api.Ads.AdWords.Lib.AdWordsServiceSignature}
> State: Created {0}
> Timeout: 0
> Url: "
> https://adwords.google.com/api/adwords/cm/v201806/CampaignService";
> User: {Google.Api.Ads.AdWords.Lib.AdWordsUser}
> UserAgent: Nothing
>
> CampaignService.User.Config
> {Google.Api.Ads.AdWords.Lib.AdWordsAppConfig}
> AdWordsApiServer: "https://adwords.google.com";
> ClientCustomerId: "Replace for security"
> DeveloperToken: "Replace for security"
> EnableGzipCompression: True
> GMBLoginEmail: ""
> GMBOAuth2RefreshToken: ""
> IncludeUtilitiesInUserAgent: False
> IncludeZeroImpressions: Nothing
> MaskCredentials: True
> MerchantCenterId: 0
> OAuth2AccessToken: ""
> OAuth2ClientId: "Replace for security"
> OAuth2ClientSecret: "Replace for security"
> OAuth2Mode: APPLICATION {0}
> OAuth2PrivateKey: ""
> OAuth2PrnEmail: ""
> OAuth2RedirectUri: "Replace for security"
> OAuth2RefreshToken: "Replace for security"
> OAuth2Scope: "https://www.googleapis.com/auth/adwords";
> OAuth2SecretsJsonPath: ""
> OAuth2ServerUrl: "https://accounts.google.com";
> OAuth2ServiceAccountEmail: Nothing
> Proxy: Nothing
> RetryCount: 0
> Signature: "AwApi-DotNet/23.6.0, Common-Dotnet/9.4.0, .NET 
> CLR/4.0.30319.42000, "
> SkipColumnHeader: False
> SkipReportHeader: False
> SkipReportSummary: False
> Timeout: 60
> UnixTimestamp: 1534434608
> UseRawEnumValues: Nothing
> UserAgent: "Replace for security"
>
> selector
> {Google.Api.Ads.AdWords.v201806.Selector}
> dateRange: {Google.Api.Ads.AdWords.v201806.DateRange}
> fields: {Length=7}
> ordering: Nothing
> paging: {LIMIT 0, 500}
> predicates: Nothing
> ?selector.fields
> {Length=7}
> (0): "Id"
> (1): "Name"
> (2): "Status"
> (3): "StartDate"
> (4): "EndDate"
> (5): "BaseCampaignId"
> (6): "AdvertisingChannelType"
>
> {"Failed to refresh access token. See inner exception for details."}
> at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean 
> includeTaskCanceledExceptions)
> at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, 
> CancellationToken cancellationToken) 
> at 
> Google.Api.Ads.Common.OAuth.AdsOAuthProviderImpl.GetAccessTokenForAuthorizationCodeFlow()
>   
> at 
> Google.Api.Ads.Common.OAuth.AdsOAuthProviderImpl.RefreshAccessTokenInOfflineMode()
>
> Error Occurred Message: Failed to retrieve campaign(s). Stack