Re: USER_PERMISSION_DENIED on Get recomandation call

2020-04-27 Thread emona hystuna
Hello Nirmita,

First of all thank you for the response, 

We already have credentials from the AdWords API and the code 
of google_ads_php.ini is as shown:

[GOOGLE_ADS]
; Required AdWords API properties. Details can be found at:
; https:
//developers.google.com/adwords/api/docs/guides/basic-concepts#soap_and_xml
developerToken = "xxx"
clientCustomerId = "774-826-5171"
loginCustomerId = "266-371-1171"

The GetTextAdRecommendations.php code si the same as the example on php 
library on : 
https://github.com/googleads/google-ads-php/blob/master/examples/Recommendations/GetTextAdRecommendations.php

How can I check if the account manager 266-371-1171 has the administrative 
access for the customer_id 3617418922. 
this customer id is in the hierarchy of this account manager.

class GetTextAdRecommendations
{
private const CUSTOMER_ID = '3617418922';
private const PAGE_SIZE = 1000;

public static function main()
{
// Either pass the required parameters for this example on the 
command line, or insert them
// into the constants above.
$options = (new ArgumentParser())->parseCommandArguments([
ArgumentNames::CUSTOMER_ID => GetOpt::REQUIRED_ARGUMENT
]);
// Generate a refreshable OAuth2 credential for authentication.
$oAuth2Credential = (new OAuth2TokenBuilder())->fromFile(
'../Authentication/google_ads_php.ini')->build();

// Construct a Google Ads client configured from a properties file 
and the
// OAuth2 credentials above.
$googleAdsClient = (new GoogleAdsClientBuilder())
->fromFile('../Authentication/google_ads_php.ini')
->withOAuth2Credential($oAuth2Credential)
->build();
...


I have reply privately to the author before 2 days .

Please can you help me with this . 

Thank you 
Emona



On Wednesday, 22 April 2020 18:15:29 UTC+2, adsapiforumadvisor wrote:
>
> Hi Emona,
>
>
> Thanks for reaching out. The error USER_PERMISSION_DENIED 
> 
>  usually 
> occurs when there is no link between the manager account authenticated in 
> the request and the client account specified in the headers. Could you 
> please make sure that the manager account you used to authenticate the call 
> has administrative access to the client account you are calling against? If 
> the issue persists, could you please send me the complete request and 
> response logs along with the client customer id and the email you used to 
> generate the OAuth2 credentials via *Reply privately to the author option*
> ?
>
>
> For the PHP library logging information, you can follow the instructions 
> here 
> 
> .
>
>
> Thanks,
> Nirmita Patel Google Ads Team
>
>
> ref:_00D1U1174p._5001UaRtCQ:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b698c6d9-ea7b-4cca-844f-302edfb56e84%40googlegroups.com.


RE: USER_PERMISSION_DENIED on Get recomandation call

2020-04-22 Thread Google Ads API Forum Advisor Prod
Hi Emona,


Thanks for reaching out. The error USER_PERMISSION_DENIED usually occurs when 
there is no link between the manager account authenticated in the request and 
the client account specified in the headers. Could you please make sure that 
the manager account you used to authenticate the call has administrative access 
to the client account you are calling against? If the issue persists, could you 
please send me the complete request and response logs along with the client 
customer id and the email you used to generate the OAuth2 credentials via Reply 
privately to the author option?


For the PHP library logging information, you can follow the instructions here.


Thanks,
Nirmita Patel Google Ads Team
ref:_00D1U1174p._5001UaRtCQ:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/NOMK70Q976H000WOWaXLX2TsKNtLGSSBY7Ag%40sfdc.net.