API call to content.products.list failed with error

263 views
Skip to first unread message

Yevheniia Bohoslavska

unread,
May 6, 2021, 7:04:33 AM5/6/21
to Google Ads Scripts Forum
Hi everyone! 
I'm trying to make Shopping API call with ads script (API call looks like  
 var pageToken;
 var maxResults = 250;
   do {
    var productList = ShoppingContent.Products.list(MERCHANT_ID, {
      pageToken: pageToken,
      maxResults: maxResults
    })), 
I need to know ID and price of the products. I tested it on the one of my accounts - it worked just perfectly, but when I'm trying to run same script on my second account I have this error  "API call to content.products.list failed with error: v2 API is not available for the account." Any ideas what I should do to avoid this error? 

Google Ads Scripts Forum Advisor

unread,
May 6, 2021, 9:13:13 PM5/6/21
to adwords...@googlegroups.com

Hello there,

Thank you for raising this to us.

Please note that this forum channel is for us to assist you with issues/concerns related to the Google Ads scripts. Looking on the error you've encountered, this seems to be connected to the Shopping Content Service of the Google Apps Script which I'm afraid is already out of our team's expertise. It would be best that you reach out to the Apps Script support via this link instead for better assistance.

As an aside, I've looked over the documentation of the Shopping API and noticed this note (Version v2 of the Content API is scheduled for sunset on September 30th, 2021. Onboarding to v2 will stop on April 30, 2021. To avoid disruptions with your integration, please migrate to v2.1 as soon as possible.) This might be the reason of the issue. To get more details about it, it would be best to reach out to their support team instead.

Regards,

Google Logo
Mark Kevin Albios
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2GKQIj:ref

Nils Rooijmans

unread,
May 7, 2021, 3:15:44 AM5/7/21
to Google Ads Scripts Forum
I recommend disabling and then re-enabling the Shopping content API under Advanced API's,


Hope this helps, 

Nils Rooijmans 
See my Google Ads Scripts FAQ to avoid the same mistakes I made: https://nilsrooijmans.com/google-ads-scripts-faq/



Google Ads Scripts Forum Advisor

unread,
May 7, 2021, 3:56:57 AM5/7/21
to adwords...@googlegroups.com

Hello Nils,

Thanks for sharing additional input.

@Yevheniia - you can try Nil's input below. However, if nothing works on your end, we suggest that you reach out to the appropriate team (Apps Script Team) via this link instead for better assistance.

Regards,

Yevheniia Bohoslavska

unread,
May 7, 2021, 5:34:33 AM5/7/21
to Google Ads Scripts Forum
No, it's not working, it's API migration problem. And I can't figure out what code I need to use in order to make proper API v2.1 call within google ads script

Google Ads Scripts Forum Advisor

unread,
May 7, 2021, 6:51:47 AM5/7/21
to adwords...@googlegroups.com
Hello Yevheniia,

Thanks for coming back. If you are using the Shopping Content Service through the Google Ads scripts, please provide your Google Ads account ID and the name of your script so we can take a closer look at what is causing this issue. On the other hand, if you are using the service in question through the Google Apps Script, kindly reach out to the Google App Script team/community to help you further on their side of things through this link.

Thanks,
Google Logo
Harry Cliford Rivera
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2GKQIj:ref

Yevheniia Bohoslavska

unread,
May 7, 2021, 6:57:24 AM5/7/21
to Google Ads Scripts Forum
Is there a way to use private chat with someone? I can't share my IDs here

Google Ads Scripts Forum Advisor

unread,
May 9, 2021, 9:31:14 PM5/9/21
to adwords...@googlegroups.com

Hello Yevheniia,

Thank you for getting back to us.

I'm afraid that we can only provide assistance via this forum thread. However, you can send the requested details via this email address (googleadsscr...@google.com).

Regards,

Google Logo
Mark Kevin Albios
Google Ads Scripts Team
 

 

ref:_00D1U1174p._5004Q2GKQIj:ref

Google Ads Scripts Forum Advisor

unread,
May 10, 2021, 5:25:01 AM5/10/21
to adwords...@googlegroups.com
Hello Yevheniia,

Thanks for providing your details. Allow me to reach out to the rest of the team for further insights on this and get back to you once I have more information.

Thanks,
Google Logo
Harry Cliford Rivera
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2GKQIj:ref
Message has been deleted

Google Ads Scripts Forum Advisor

unread,
May 27, 2021, 7:17:42 AM5/27/21
to adwords...@googlegroups.com
Hello,

When the 2.0 version of the Content API was turned down, existing usage was allowed to continue for some time, but new usage was blocked. We are currently working on adding support for the 2.1 version, which was not quite ready yet when the initial turndown happened.

Keep an eye out for the new version to appear in scripts. Until then, unfortunately, it will not be possible to set up new scripts using this API.

Regards,
Mike, Google Ads Scripts Team

ref:_00D1U1174p._5004Q2GKQIj:ref
Reply all
Reply to author
Forward
0 new messages