import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
pipedream_connect: {
type: "app",
app: "pipedream_connect",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.pipedream.com/v1/apps`,
headers: {
Authorization: `Bearer ${this.pipedream_connect.$auth.oauth_access_token}`,
},
})
},
})
Pipedream Connect uses OAuth authentication. When you connect your Pipedream Connect account, Pipedream will open a popup window where you can sign into Pipedream Connect and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Pipedream Connect API.
Pipedream requests the following authorization scopes when you connect your account:
POST
https://api.pipedream.com/v1/oauth/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.client_id}}
&
client_secret={{custom_fields.client_secret}}
&
grant_type=client_credentials
POST
https://api.pipedream.com/v1/oauth/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.client_id}}
&
client_secret={{custom_fields.client_secret}}
&
grant_type=client_credentials