import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
greenhouse: {
type: "app",
app: "greenhouse",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://harvest.greenhouse.io/v1/user_roles`,
auth: {
username: `${this.greenhouse.$auth.api_key}`,
password: ``,
},
})
},
})
Greenhouse uses API keys for authentication. When you connect your Greenhouse account, Pipedream securely stores the keys so you can easily authenticate to Greenhouse APIs in both code and no-code steps.
In order to create a Harvest API key, a user must be granted the “Can manage ALL organization’s API Credentials” in the “Developer permission” section. That user can then go Configure >> Dev Center >> API Credential Management as described in Harvest API Introduction.