import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
action1: {
type: "app",
app: "action1",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://app.action1.com/api/3.0/organizations`,
headers: {
Authorization: `Bearer ${this.action1.$auth.oauth_access_token}`,
},
})
},
})
Action1 uses OAuth authentication. When you connect your Action1 account, Pipedream will open a popup window where you can sign into Action1 and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Action1 API.
Pipedream requests the following authorization scopes when you connect your account:
POST
https://app.action1.com/api/3.0/oauth2/token
client_id={{custom_fields.client_id}}
&
client_secret={{custom_fields.client_secret}}