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:
POST
https://api.egestor.com.br/api/oauth/access_token
Accept: application/json
grant_type=personal
&
personal_token={{custom_fields.personal_token}}
POST
https://api.egestor.com.br/api/oauth/access_token
content-type: application/json
accept: application/json
grant_type=personal
&
personal_token={{custom_fields.personal_token}}