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