Link checker script - Invalid argument

68 views
Skip to first unread message

Jessica Baaphy

unread,
May 13, 2020, 10:27:40 PM5/13/20
to Google Ads Scripts Forum
Hi, 

I keep getting an invalid argument as a response code, and it is indicating that the ? in the URL is the reasoning behind this. 

The URL is working fine with no issues

Has anyone else had this?

Thanks,

Jess

Google Ads Scripts Forum Advisor

unread,
May 14, 2020, 1:36:42 AM5/14/20
to adwords...@googlegroups.com
Hi Jess,

Thanks for posting your concern.

The reason why this error is occurring for working URL is because the UrlFetchApp.fetch() and getResponseCode() is not accepting some of the special characters.

With this, I would recommend using the encodeURI() function to decode the URL first before passing to the UrlFetchApp.fetch().

For your convenience, you can clarify whether the Link checker you are using is for client account or MCC account so that I can point out the line of the code that needs to modify.

Regards,
Ejay
Google Ads Scripts Team

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