import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
egestor: {
type: "app",
app: "egestor",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.egestor.com.br/api/v1/usuarios`,
headers: {
Authorization: `Bearer ${this.egestor.$auth.oauth_access_token}`,
},
})
},
})
eGestor uses OAuth authentication. When you connect your eGestor account, Pipedream will open a popup window where you can sign into eGestor and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any eGestor API.
Pipedream requests the following authorization scopes when you connect your account:
POSThttps://api.egestor.com.br/api/oauth/access_tokenAccept: application/jsongrant_type=personal&personal_token={{custom_fields.personal_token}}POSThttps://api.egestor.com.br/api/oauth/access_tokencontent-type: application/jsonaccept: application/jsongrant_type=personal&personal_token={{custom_fields.personal_token}}