REST endpoint for GoogleAdsService

1,135 views
Skip to first unread message

Ольга Иванченко

unread,
Nov 29, 2019, 8:01:13 PM11/29/19
to AdWords API and Google Ads API Forum
Hello!
How can I get request URL for the GoogleAdsService.Search for use REST/JSON? Can't use client libraries.

Google Ads API Forum Advisor Prod

unread,
Dec 2, 2019, 5:00:50 PM12/2/19
to olka.pozi...@gmail.com, adwor...@googlegroups.com
Hi, 

The Google Ads API server endpoint where all requests are sent is: https://googleads.googleapis.com. You may refer to this guide on how to build the request URL for any specific object. Please refer to an example which illustrates about the request URL for GoogleAdsService.Search. Let me know if you have any further questions.

Regards,
Bharani, Google Ads API Team
 

ref:_00D1U1174p._5001UODXR6:ref

Sergey Biryuzov

unread,
Feb 7, 2020, 12:52:53 PM2/7/20
to AdWords API and Google Ads API Forum
Thanks for your answer it helps me!
Can you tell me, when I make request like it is in the example you linked, I catch error:
[error] => Array
        (
            [code] => 401
            [message] => Request had invalid authentication credentials. 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
        )
But when I add another one HTTP  Header:
login-customer-id
Everything works great.

What is the reason of error in my request without "login-customer-id" in HTTP Head? I don't think that it is an error in example.

вторник, 3 декабря 2019 г., 1:00:50 UTC+3 пользователь adsapiforumadvisor написал:

Google Ads API Forum Advisor Prod

unread,
Feb 7, 2020, 4:23:35 PM2/7/20
to sbir...@gmail.com, adwor...@googlegroups.com
Hi Sergey,

You can find more details on the login-customer-id here. If you don't include it, it will default to your operating customer. Please share through reply privately to author your request and response so I can take a closer look.

Regards,
Anthony
Reply all
Reply to author
Forward
0 new messages