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