How to use the Google Ads API

62 views
Skip to first unread message

•Miguel Rayón•

unread,
Mar 15, 2023, 1:22:01 PM3/15/23
to Google Ads API and AdWords API Forum
Hi,  
My question is how it would be to be able to access the customers of a user who logged in to my website and granted AdWords access since I tried to make the request but it asks me for the developer token for this there is an error in how I do it or already I use javascript and axios for the url request  

 const config = {
      headers: {
        Authorization: `Bearer ${access_token}`,
      },
    };

    let adsInfo = {};

    adsInfo = await axios.get(
      `https://googleads.googleapis.com/v11/customers:listAccessibleCustomers`,
      config
    );
thanks C:

Google Ads API Forum Advisor

unread,
Mar 15, 2023, 5:54:31 PM3/15/23
to dant...@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for reaching out to Google Ads API Forum.

Moving forward with your concern, can you share to us the complete request and response logs with the request-id when you encountered the error on your end so that we will be able to investigate further. We can check within these logs the request data you sent to the API and its corresponding response and its error details and error messages. You may provide it via the Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Kindly note that developer token lets your app connect to the Google Ads API. Each developer token is assigned an access level which controls the number of API calls you can make per day with the token, and the environment to which you can make calls / requests.

Regards,

Google Logo Google Ads API Team


ref:_00D1U1174p._5004Q2jzGlJ:ref

•Miguel Rayón•

unread,
Mar 15, 2023, 6:24:37 PM3/15/23
to Google Ads API and AdWords API Forum
hello the problem is Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential but I pass the access_token through the header and I would like to know the method of obtaining google ads view without developer token since I plan that any other user who logs in to me can use it Web page

Google Ads API Forum Advisor

unread,
Mar 16, 2023, 6:53:24 AM3/16/23
to dant...@gmail.com, adwor...@googlegroups.com
Hi Miguel,

Thank you for the reply.

For our team to further investigate it first and provide an appropriate recommendation to you, could you please provide us first with the complete API logs (request and response logs with the request-id) generated on  your end?

Note that this can be requested or provided to the developer handling the Google Ads API transactions when logging of the API requests has been enabled. You may check here and click your client library for the specific guideline to enable it.

For REST interface requests, you can enable logging via the curl command by using the -i flag. This will cause the tool to include the HTTP response headers in the output.

You may then send the requested information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Best regards,
Reply all
Reply to author
Forward
0 new messages