Victor Bittencourt
Victor Bittencourt

Reputation: 67

How to use Google Apps Script setAuthentication?

So, I created an script on google sheets that, basically, selects a set of addresses on a sheet and uses Maps.newGeocoder.geocode() to get geocodes and calculate distances. It works wonderfully, no problems there. However, when I try to authenticate using Maps.setAuthentication(clientId, signingKey);, I just get an error.

I got my credentials from loging into https://console.cloud.google.com/, creating a random project and by going in "Create credentials". When I go into the credentials tab, I can select OAuth2.0 and see clientId and client secret key. I am using these to authenticate. Is it correct? What am I doing wrong? How the hell can I get the credentials? Thanks a lot!

Upvotes: 0

Views: 272

Answers (1)

Alessandro
Alessandro

Reputation: 2998

The setAuthentication(clientId, signingKey) method enables the use of an externally established Google Maps APIs Premium Plan account, to leverage additional quota allowances. Your client ID and signing key can be obtained from the Google Enterprise Support Portal.

They are not the same as client ID and client secret key as explained here.

Note that this type of account is not longer available for new customers.

Here some helpful links:

Premium Plan Support

Premium Plan FAQ

Upvotes: 1

Related Questions