Sorry about the previous post, it was an issue with the access token.

Below is the error when I tried with the new access token. Do I need to set 
something on the query request body? If yes is there any example on what I 
need to add? Thanks again!

{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": 
"type.googleapis.com/google.ads.googleads.v17.errors.GoogleAdsFailure",
"errors": [
{
"errorCode": {
"queryError": "UNEXPECTED_END_OF_QUERY"
},
"message": "Error in query: unexpected end of query."
}
],
"requestId": "nwkI27hw9v9cmO_ii0Purw"
}
]
}
}

On Saturday, October 19, 2024 at 1:48:10 PM UTC+7 Nicolas wrote:

> Hi, 
> Thank you for the reply!
>
> I tried using both Search and SearchStream with this information
>
> https://googleads.googleapis.com/v17/customers/1234567890/googleAds:search 
> On headers: Authorization: Access Token from 
> https://oauth2.googleapis.com/token
> developer-token: developer-token And I got this response {
>     "error": {
>         "code": 401,
>         "message": "Request is missing required authentication credential. 
> Expected OAuth 2 access token, login cookie or other valid authentication 
> credential. See 
> https://developers.google.com/identity/sign-in/web/devconsole-project.";,
>         "status": "UNAUTHENTICATED",
>         "details": [
>             {
>                 "@type": "type.googleapis.com/google.rpc.ErrorInfo",
>                 "reason": "CREDENTIALS_MISSING",
>                 "domain": "googleapis.com",
>                 "metadata": {
>                     "method": 
> "google.ads.googleads.v17.services.GoogleAdsService.Search",
>                     "service": "googleads.googleapis.com"
>                 }
>             }
>         ]
>     }
> }
>
> Am I missing something? Thank you!
> On Friday, October 18, 2024 at 6:00:16 PM UTC+7 Google Ads API Forum 
> Advisor wrote:
>
>> Hi,
>>
>> Thank you for reaching out to the Google Ads API support team.
>>
>> In order to retrieve customer account details for each ad account in the 
>> Google Ads API, you can execute the following query: 
>>
>>
>> SELECT customer_client.id, customer_client.level, 
>> customer_client.currency_code, customer_client.client_customer, 
>> customer_client.manager, customer_client.status, 
>> customer_client.resource_name FROM customer_client
>>
>> You can try making a request using the Search 
>> <https://developers.google.com/google-ads/api/rest/reference/rest/v17/customers.googleAds/search>
>>  or SearchStream 
>> <https://developers.google.com/google-ads/api/rest/reference/rest/v17/customers.googleAds/searchStream>
>>  by 
>> passing the customer Id. Also, you can use Query Builder 
>> <https://developers.google.com/google-ads/api/fields/v14/customer_search_term_insight_query_builder>
>>  to 
>> create your query and Query Validator 
>> <https://developers.google.com/google-ads/api/fields/v14/query_validator> to 
>> validate your query. I hope this helps, let me know how this goes on your 
>> end.
>>
>> If you are not looking for this, kindly provide us the uncropped UI 
>> screenshot of the Google Ads account details individually that you require 
>> to retrieve via the API.
>>   
>> This message is in relation to case 
>> "ref:!00D1U01174p.!5004Q02vGf9V:ref" (ADR-00272179)
>>
>> 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 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/5921a14b-baa1-42ed-9061-0601625ecc91n%40googlegroups.com.
  • Re... Nicolas
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... Nicolas
        • ... Nicolas
          • ... Nicolas
          • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to