Hello Steve, 

The USER_PERMISSION_DENIED 
<https://developers.google.com/adwords/api/docs/common-errors#AuthorizationError.USER_PERMISSION_DENIED>
 error 
is experienced when there is no link between the manager account 
authenticated in the request and the client account specified or when the 
OAuth credentials used are for a user who do not have access to the client 
customer ID specified or any of its manager accounts. You could use 
CustomerService.getCustomers() 
<https://developers.google.com/adwords/api/docs/reference/v201710/CustomerService#getcustomers>
 which 
returns details of all the customers directly accessible by the user 
authenticating the call and then use the ManagedCustomerService 
<https://developers.google.com/adwords/api/docs/reference/v201710/ManagedCustomerService>
 to 
determine the client accounts linked to a manager account. 

If you continue to have an issue with this, could you provide us the SOAP 
request and response logs for the API call along with the email address 
used for authentication, so we can take a look and assist further. You can 
respond via *Reply privately to author *option while replying. 

Thanks,
Bharani, AdWords API Team

On Monday, October 30, 2017 at 9:56:04 AM UTC-4, nhaad...@gmail.com wrote:
>
> I am following your tutorial - Make Your First API Call - 
> https://developers.google.com/adwords/api/docs/guides/first-api-call
>
>
>    1. Created a new email/manager account and requested a developer token
>    2. Created a new email/test manager account from the manager account
>    3. Created a test client from the test manager - I was not prompted to 
>    create a new email for this - just a name
>    4. Created test campaign/ad group/ad
>    5. Created a C# client via NuGet
>    6. Setup my OAuth2 authentication via Refresh token generator
>    7. Execute sample application making a call to the GetCampaigns module
>
> I receive the following error - 
>
> This code example lists all campaigns. To add a campaign, run 
> AddCampaign.cs.
> An exception occurred while running this code example. 
> System.Reflection.TargetInvocationException (Exception has been thrown by 
> the target of an invocation.)
>
>    at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] 
> arguments, Signature sig, Boolean constructor)
>    at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, 
> Object[] parameters, Object[] arguments)
>    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags 
> invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
>    at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
>    at AdWordsConsoleApp.Examples.CSharp.Program.InvokeRun(Object 
> codeExample, AdWordsUser user) in 
> \\nhafile100\user_data$\solson\Documents\Visual Studio 
> 2017\Projects\AdWordsConsoleApp\AdWordsConsoleApp\Program.cs:line 138
>    at 
> AdWordsConsoleApp.Examples.CSharp.Program.RunACodeExample(AdWordsUser user, 
> Object codeExample) in \\nhafile100\user_data$\solson\Documents\Visual 
> Studio 2017\Projects\AdWordsConsoleApp\AdWordsConsoleApp\Program.cs:line 97
>
> Caused by
>
> System.ApplicationException (Failed to retrieve campaigns)
>
>    at 
> AdWordsConsoleApp.Examples.CSharp.v201710.GetCampaigns.Run(AdWordsUser 
> user) in \\nhafile100\user_data$\solson\Documents\Visual Studio 
> 2017\Projects\AdWordsConsoleApp\AdWordsConsoleApp\v201710\BasicOperations\GetCampaigns.cs:line
>  
> 89
>
> Caused by
>
> Google.Api.Ads.AdWords.Lib.AdWordsApiException (AdWordsApiException: 
> Exception of type 'Google.Api.Ads.AdWords.Lib.AdWordsApiException' was 
> thrown.
>
> User doesn't have permission to access customer.. (Error: 
> AuthorizationError.USER_PERMISSION_DENIED, FieldPath: , Trigger: <null>)
>
> )
>
>
> I've looked into the error/forums and the only mention is the accounts 
> aren't linked.  I created the test manager account from the manager account 
> and the test client from the test manager account.  My understanding is 
> that linking accounts is on the production side.  The test client created 
> from the test manager doesn't even have its own email as far as I can tell.
>
> Thanks for any help,
> Steve
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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.
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/1566f8aa-faef-4a30-8786-9d5fd4f18275%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • User doesn't ... nhaadwords
    • Re: User... 'Bharani Cherukuri (AdWords API Team)' via AdWords API Forum

Reply via email to