import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
rex: {
type: "app",
app: "rex",
}
},
async run({steps, $}) {
return await axios($, {
method: "POST",
url: `https://api.rexsoftware.com/v1/rex/user-profile/get-all-accounts`,
headers: {
Authorization: `Bearer ${this.rex.$auth.access_token}`,
"Content-Type": `application/json`,
},
})
},
})
Rex uses OAuth authentication. When you connect your Rex account, Pipedream will open a popup window where you can sign into Rex and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Rex API.
Pipedream requests the following authorization scopes when you connect your account:
POST
https://{{custom_fields.region}}.rexsoftware.com/v1/rex/Authentication/login
email={{custom_fields.email}}
&
password={{custom_fields.password}}
POST
https://{{custom_fields.region}}.rexsoftware.com/v1/rex/Authentication/login
email={{custom_fields.email}}
&
password={{custom_fields.password}}