Hi Barbara,
Thanks for reaching out to the Google Ads API team. I hope you are doing well today.
To explain how to access accounts in a visual way here are the following pointers:
The Google account that generated the refresh token used to access the API was to access an account in the Ads UI. They will see all the the accounts that List Accessible Accounts returns in the top right drop down list when you click the circle representation of the user in the UI. These are accounts the user has direct access to. If an account in that list is an MCC with child accounts attached, then to see the child accounts you would select that MCC in the top right of the UI and then the child accounts are accessible in the top left - middle accounts drop down list box in the UI. These are the same accounts that Get Account Hierarchy shows.
To access accounts that are in the top left - middle accounts drop down list box via the API you would put the selected account in the top right list in the UI as login customer Id, and you would put the selected account in the top left - middle accounts drop down list box as the operating customer.
Here are a few more useful pointers:
Here's our login customer Id guide and migration guide.
Any account returned by List Accessible Accounts when using a specific refresh token doesn't need the login customer Id.
Another property of those accounts returned by List Accessible Accounts is they are the only accounts that can be a login customer Id for the specific refresh token making the API call.
Any account returned by Get Account Hierarchy when you you don't specify manager ID and login customer ID can be accessed by your refresh token you used to make the API call.
Debugging API calls:
To generate a refresh token and be able to detect who generated it you can follow our OAuth Playground guide and add another scope -https://www.googleapis.com/auth/userinfo.email.
If that works, then generate an access token from that refresh token in a Bash Terminal.
Now, we want to check the data on the access token to make sure everything on the access token is working as expected. Put this in your browser with the access token inserted that you got back.
If that works, then let's try a request from the command line:
I hope this helps.
Let us know if you have further questions.
Regards,
|
||||||