Easy & Accurate Payroll. Managing your people has never been easier with ADP's all-in-one, cloud-based platform for payroll, HR, time, talent and benefits.
Go to siteimport { axios } from "@pipedream/platform"
export default defineComponent({
props: {
adp: {
type: "app",
app: "adp",
}
},
async run({steps, $}) {
const httpsAgent = new https.Agent({
cert: this.adp.$auth.crt_file,
key: this.adp.$auth.key_file,
})
return await axios($, {
url: `https://api.adp.com/hr/v2/workers`,
headers: {
Authorization: `Bearer ${this.adp.$auth.oauth_access_token}`,
},
httpsAgent: httpsAgent
})
},
})
ADP uses OAuth authentication. When you connect your ADP account, Pipedream will open a popup window where you can sign into ADP and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any ADP API.
Pipedream requests the following authorization scopes when you connect your account:
POST
https://accounts.adp.com/auth/oauth/v2/token
content-type: application/x-www-form-urlencoded
accept: application/json
grant_type=client_credentials
POST
https://accounts.adp.com/auth/oauth/v2/token
content-type: application/x-www-form-urlencoded
accept: application/json
grant_type=client_credentials