RE: Get Campaigns in general account (not manager account)

2022-10-21 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi,

This is Carmela from the Google Ads API team. Thank you for reaching out.

With regard to your concern, it appears that you have encountered the 
USER_PERMISSION_DENIED. It means that the authorized customer does not have 
access to the operating customer. It's common cause is when authenticating as a 
user with access to a manager account but not specifying login-customer-id in 
the request. That said, I would suggest specifying the login-customer-id as the 
manager account ID without hyphens (-). Client libraries have built in support 
for this, or see our guide.

If the issue persists even after doing this, then you may provide the complete 
request and response logs with request ID and request header generated on your 
end so our team can provide guidance accordingly? If you haven't yet, logging 
can be enabled by navigating to the Client libraries > Your client library (ex. 
Java) > Logging documentation, which you can access from this link. You can 
provide it via Reply privately to author option. If this option is not 
available, then send it instead on this email address 
googleadsapi-supp...@google.com.

Regards,

Carmela
Google Ads API Team
ref:_00D1U1174p._5004Q2cOoUD: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 
"Google Ads API and AdWords 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/TAoYc0RK3KIJ00Hbsdmx-DT6SEEYCq2vF4kg%40sfdc.net.


Get Campaigns in general account (not manager account)

2022-10-21 Thread Oleg Disrupt
Hello
I tried to get the campaigns using google-ads-php sdk.
I tried to get the campaigns by using one account in my manager account so 
I can get the campaigns list successfully
for example
*php examples/BasicOperations/GetCampaigns.php --customerId xx0632*

but I tried to get them with general account (not inside manager account) 
so it shows error

error is

ApiException was thrown with message '{
"message": "The caller does not have permission",
"code": 7,
"status": "PERMISSION_DENIED",
"details": [
{
"@type": 
"type.googleapis.com\/google.ads.googleads.v11.errors.GoogleAdsFailure",
"errors": [
{
"errorCode": {
"authorizationError": "USER_PERMISSION_DENIED"
},
"message": "User doesn't have permission to access 
customer. Note: If you're accessing a client customer, the manager's 
customer id must be set in the 'login-customer-id' header. See 
https:\/\/developers.google.com\/google-ads\/api\/docs\/concepts\/call-structure#cid"
}
],
"requestId": "oPSM3-sbB3ml9QpAmXh5AA"
}
]
}'.

So how can i get the campaigns in general account?
Thanks

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords 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/0eda7084-c9a0-44c1-a529-34e97d335a2an%40googlegroups.com.