google-cloud-node
google-cloud-node copied to clipboard
Authenticating for @googlemaps/addressvalidation with an API key
According to the docs/examples of Google Address Validation we can use an API key to authenticate:
curl -X POST -d '{
"address": {
"regionCode": "US",
"locality": "Mountain View",
"addressLines": ["1600 Amphitheatre Pkwy"]
}
}' \
-H 'Content-Type: application/json' \
"https://addressvalidation.googleapis.com/v1:validateAddress?key=API_KEY"
https://developers.google.com/maps/documentation/address-validation/requests-validate-address
However, I can't see any reference/docs as to how I can use said API key when using SDK: https://www.npmjs.com/package/@googlemaps/addressvalidation
Nor can I see any reference to that in https://github.com/googleapis/google-auth-library-nodejs
Any clues? Or am I restricted to making http calls (fetch, axios etc) from my node app in order to achieve this?