RE: navigating the insane authentication

125 views
Skip to first unread message
Message has been deleted

Google Ads API Forum Advisor

unread,
Mar 25, 2024, 10:05:15 AM3/25/24
to cognitech...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for contacting the Google Ads API support team.

I understand that you are facing some issues while making an API call. To make an API call to a Google Ads customer, you need access to that customer either directly or through a linked manager account. You also need the proper permissions depending on the particular API call. I would suggest you to Prepare the customer account before making an API call. You need below details to make an API call.

Developer token: A developer token from Google lets your app connect to the Google Ads API. This is a 22-character long alphanumeric string, and is listed under the "API Center" page of your Google Ads manager account. After Sign in then navigate to TOOLS & SETTINGS > SETUP > API Center. The API Center option appears only for Google Ads manager account.

Client ID and client secret: You can find the client ID and client secret in the Google API Console under credentials, you may refer to this guide for more information. 

Refresh token: The Google Ads API uses OAuth 2.0 as the authorization mechanism. By default, OAuth 2.0 authentication issues an access token that expires after a limited time. To renew the access token automatically, you should issue a refresh token instead.

Customer ID: The 10-digit customer ID of the customer account to which you plan to make API calls against. This is sometimes referred to as the operating customer.

Log-in-customer ID: The 10-digit login customer ID of the customer account you're signed in to. If you're signed in to the operating customer, the login customer ID is the same as the customer ID.

I would suggest you to go through 'Make an API call' guide for more information about making API call in PHP. Let us know if you have any further queries.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02s0CGR:ref" (ADR-00228522)

Thanks,
 
Google Logo Google Ads API Team

 

Message has been deleted
Message has been deleted

Google Ads API Forum Advisor

unread,
Apr 1, 2024, 10:18:26 PM4/1/24
to cognitech...@gmail.com, adwor...@googlegroups.com
Hi,

We can understand your situation, could you please let us know what the exact issue is that you have noticed with the API?

CogniTech Systems

unread,
Apr 2, 2024, 8:32:37 AM4/2/24
to Google Ads API and AdWords API Forum
It is an absolute nightmare! For instance now, we are passing the following array to keyword suggestions:

 ["advanced artificial intelligence","ai development","ai development north wales","ai development uk","artificial intelligence","artificial intelligence development","artificial intelligence development north wales","artificial intelligence development uk","artificial intelligence north wales","artificial intelligence uk","ecommerce development","ecommerce development north wales","ecommerce north wales","intelligent ecommerce","internet of things","internet of things development","internet of things development uk","internet of things north wales","internet of things uk","seo north wales","seo packages","seo packages north wales","seo uk","social media management","social media management north wales"]
 
and it just fails, errors with the following: 
[02-Apr-2024 07:55:58 Europe/London] PHP Fatal error:  Uncaught Google\ApiCore\ApiException: {
    "message": "Request contains an invalid argument.",
    "code": 3,
    "status": "INVALID_ARGUMENT",
    "details": [
        {
            "@type": "google.ads.googleads.v16.errors.googleadsfailure-bin",
            "data": "<Unknown Binary Data>"
        },
        {
            "@type": "grpc-status-details-bin",
            "data": "<Unknown Binary Data>"
        },
        {
            "@type": "request-id",
            "data": "LA29NVJ0cKoLkcHHvZzPVA"
        }
    ]
}

  thrown in /home/cognitech/vendor/googleads/google-ads-php/src/Google/Ads/GoogleAds/Lib/V16/GoogleAdsExceptionTrait.php on line 75

What kind of an error message is that? Absolutely no description of what the actual issue is. The array is valid, the exact same array is passed to the historical api with absolutely no issues. Swapping the array for a different array also works. How does anyone think that is an acceptable response? 

CogniTech Systems

unread,
Apr 2, 2024, 6:09:40 PM4/2/24
to Google Ads API and AdWords API Forum
In the array I shared before, this is what causes the error:  "seo packages"   can some explain to me why this keyword is causing the api to error? This is nuts. 

On Tuesday, April 2, 2024 at 3:18:26 AM UTC+1 Google Ads API Forum Advisor wrote:

Google Ads API Forum Advisor

unread,
Apr 2, 2024, 11:20:36 PM4/2/24
to cognitech...@gmail.com, adwor...@googlegroups.com
Hi,

Upon checking the provided information, it is observed that your keywords are causing the error: "seo packages" via the API. In order to debug your issue further, kindly provide us with the complete API logs (request and response with request-id and request header) generated at your end to better assist you on this request. 

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java, .Net, PHP, Python, Ruby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

You can send the details via Reply privately to the author option, or direct private reply to this email.

CogniTech Systems

unread,
Apr 9, 2024, 9:17:04 PM4/9/24
to Google Ads API and AdWords API Forum
The issue was the amount of keywords being passed needed to be chunked. Why is your api documentation so bad? That information does not exist in your documentation I had to search the internet for two days to find that information! 

Google Ads API Forum Advisor

unread,
Apr 10, 2024, 11:01:40 AM4/10/24
to cognitech...@gmail.com, adwor...@googlegroups.com
Hi,

I will share the feedback with the rest of our team. If you have any more queries related to Google Ads API, please feel free to get back to us.
Reply all
Reply to author
Forward
0 new messages