import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
pinghome: {
type: "app",
app: "pinghome",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://statuspage-query.api.pinghome.io/v1/statuspages`,
headers: {
Authorization: `Bearer ${this.pinghome.$auth.oauth_access_token}`,
},
})
},
})
Pinghome uses OAuth authentication. When you connect your Pinghome account, Pipedream will open a popup window where you can sign into Pinghome and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Pinghome API.
Pipedream requests the following authorization scopes when you connect your account:
POST
https://auth.api.pinghome.io/v1/auth
accept: application/json
email={{custom_fields.email}}
&
password={{custom_fields.password}}
POST
https://auth.api.pinghome.io/v1/auth
accept: application/json
email={{custom_fields.email}}
&
password={{custom_fields.password}}