Improve checkout and delivery with reliable addresses. Address Validation lets you validate and correct address inputs.
Go to siteimport { axios } from "@pipedream/platform"
export default defineComponent({
props: {
google_address_validation: {
type: "app",
app: "google_address_validation",
}
},
async run({steps, $}) {
const data = {
"address": {
"regionCode": "US",
"addressLines": ["1600 Amphitheatre Parkway", "Mountain View, CA"]
},
"previousResponseId": "",
"enableUspsCass": true
}
return await axios($, {
method: "post",
url: `https://addressvalidation.googleapis.com/v1:validateAddress`,
params: {
key: `${this.google_address_validation.$auth.api_key}`,
},
data,
})
},
})
Google Address Validation uses API keys for authentication. When you connect your Google Address Validation account, Pipedream securely stores the keys so you can easily authenticate to Google Address Validation APIs in both code and no-code steps.
Navigate to your Google Cloud console, and enable the Address Validation API. To use the Address Validation API, you must have billing enabled on your Google Cloud project, as the Address Validation API uses a pay-as-you-go pricing model.