import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
demandbase: {
type: "app",
app: "demandbase",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.insideview.com/api/v1/admin/usage`,
headers: {
"accesstoken": `${this.demandbase.$auth.oauth_access_token}`,
"accept": `application/json`,
},
params: {
period: `year`,
start: `2023`,
end: `2025`,
},
})
},
})
Demandbase uses OAuth authentication. When you connect your Demandbase account, Pipedream will open a popup window where you can sign into Demandbase and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Demandbase API.
Pipedream requests the following authorization scopes when you connect your account:
POST
https://login.insideview.com/Auth/login/v1/token.json
?
clientId={{custom_fields.client_id}}
&
clientSecret={{custom_fields.client_secret}}
&
grantType=cred
accept: application/json
POST
https://login.insideview.com/Auth/login/v1/token.json
?
clientId={{custom_fields.client_id}}
&
clientSecret={{custom_fields.client_secret}}
&
grantType=cred
accept: application/json