import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
autotask_psa: {
type: "app",
app: "autotask_psa",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.autotask_psa.$auth.url}V1.0/ClientPortalUsers/query`,
headers: {
"UserName": `${this.autotask_psa.$auth.username}`,
"Secret": `${this.autotask_psa.$auth.password}`,
"ApiIntegrationCode": `${this.autotask_psa.$auth.api_integration_code}`,
},
params: {
search: `{
"filter": [
{
"op": "gt",
"field": "id",
"value": "1"
}
]
}`,
},
})
},
})
Autotask PSA uses OAuth authentication. When you connect your Autotask PSA account, Pipedream will open a popup window where you can sign into Autotask PSA and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Autotask PSA API.
Pipedream requests the following authorization scopes when you connect your account:
GET
?
user={{custom_fields.username}}
GET
http://webservices.autotask.net/atservicesrest/v1.0/zoneInformation
?
user={{custom_fields.username}}