import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
microbilt_developer: {
type: "app",
app: "microbilt_developer",
}
},
async run({steps, $}) {
const data = {
"Address": {
"Addr1": "1640 Airport Road #115",
"City": "Kennesaw",
"State": "GA",
"Zip": "30144"
}
}
return await axios($, {
method: "post",
url: `https://${this.microbilt_developer.$auth.environment}.microbilt.com/AddressStandardization`,
headers: {
Authorization: `Bearer ${this.microbilt_developer.$auth.oauth_access_token}`,
"content-type": `application/json`,
"accept": `application/json`,
},
data,
})
},
})
Microbilt Developer uses OAuth authentication. When you connect your Microbilt Developer account, Pipedream will open a popup window where you can sign into Microbilt Developer and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Microbilt Developer API.
Pipedream requests the following authorization scopes when you connect your account:
POST
https://{{custom_fields.environment}}.microbilt.com/OAuth/Token
content-type: application/x-www-form-urlencoded
client_id={{custom_fields.client_id}}
&
client_secret={{custom_fields.client_secret}}
&
grant_type=client_credentials