Connect to Search Console API via Ads Scripts

339 views
Skip to first unread message

norisk GmbH

unread,
Oct 22, 2018, 9:24:01 AM10/22/18
to AdWords Scripts Forum
Hi All,

I'm trying to connect to my search console account inside a Google Ads Script. I need to make an OAuth2 call but I get the following error (The library was provided by Google: https://developers.google.com/google-ads/scripts/docs/examples/oauth20-library)

{ "error": "unsupported_grant_type", "error_description": "Invalid grant_type: client_credentials" }

Obviously, I tried to connect with the grant_type client_credentials. I also tried grant_type password, but still the same error. Has anyone experienced the same errors? How did you resolve the error?

Maybe this is simply the wrong approach. If this is the case, let me know ;)

Thanks a lot. Best regards
Alex

Sravani Yelamarthi (AdWords Scripts Team)

unread,
Oct 22, 2018, 3:50:34 PM10/22/18
to AdWords Scripts Forum
Hi Alex,

Can you please provide your CID and script name (via reply privately to author) so I can check?

Thanks,
Sravani Yelamarthi
AdWords Scripts Team

Dmytro Tonkikh

unread,
Oct 23, 2018, 5:43:59 AM10/23/18
to AdWords Scripts Forum
Hi Norisk


It's for google app script, but you can adopt it to Ads Scripts

norisk GmbH

unread,
Oct 25, 2018, 3:27:18 AM10/25/18
to AdWords Scripts Forum
Thanks Dmytro! Yes that's an excellent working reference.
Reply all
Reply to author
Forward
0 new messages