I am not trying to list all the accounts but trying to get the google ad account id for the customer using the access token. Following is the flow of the sequence.
1. Customer comes to the report page where s/he sees a connect button. 2. On this button, the Google auth popup will open with all permission list like reading Google ads, getting email and profile, and google analytic (declare with scope and add in the project too) 3. On authorization I get an access token as it does not return the account id for the connected user. 4. Using the access token I want to get the Google Ad account id (it shows at top right of the Google Ads dashboard) 5. I show the Google ad reports to my customers with this account id. I have read the documentation but was not able to figure out how to do it with PHP API or with javascript. On Wednesday, December 13, 2023 at 7:56:39 AM UTC-6 Google Ads API Forum Advisor wrote: > Hi, > > Thank you for reaching out to the Google Ads API support team. > > After reviewing your concern, I understand that you are encountering an > error while trying to list the accounts via the Google Ads API. > > I would recommend you to check this guide on List Accessible Accounts > <https://developers.google.com/google-ads/api/docs/account-management/listing-accounts> > for > more information regarding how to fetch the list of customers accessible to > you. > > In order to assist you further, kindly provide us with the complete API > logs (request > <https://developers.google.com/google-ads/api/docs/concepts/field-service#request> > and response > <https://developers.google.com/google-ads/api/docs/concepts/field-service#response> > with request-id > <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id> > and request header > <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request_headers>) > > generated at your end. > > Since you are using the PHP client library, if you haven't enabled the > logging yet, I would request you to enable it by referring to this guide > PHP > <https://developers.google.com/google-ads/api/docs/client-libs/php/logging> > . > > You can send the details via *Reply privately to the author option*, or > *direct > private reply* to this email. > > > This message is in relation to case "ref:!00D1U01174p.!5004Q02r1Y38:ref" > > Thanks, > > [image: Google Logo] Google Ads API Team > > > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 [email protected] To unsubscribe from this group, send email to [email protected] 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/39b8cee8-d8b6-41a2-857b-b0cd9153d775n%40googlegroups.com.
