import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
flowii: {
type: "app",
app: "flowii",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.flowii.com/companies`,
headers: {
Authorization: `Bearer ${this.flowii.$auth.oauth_access_token}`,
"api-key": `${this.flowii.$auth.api_token}`,
},
})
},
})
FLOWii uses OAuth authentication. When you connect your FLOWii account, Pipedream will open a popup window where you can sign into FLOWii and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any FLOWii API.
Pipedream requests the following authorization scopes when you connect your account:
POSThttps://api.flowii.com/tokencontent-type: application/x-www-form-urlencodedaccept: application/jsonApi-Key: {{custom_fields.api_token}}username={{custom_fields.username}}&password={{custom_fields.password}}&grant_type=passwordPOSThttps://api.flowii.com/tokencontent-type: application/x-www-form-urlencodedaccept: application/jsonApi-Key: {{custom_fields.api_token}}client_id={{custom_fields.username}}&grant_type=refresh_token&refresh_token={{oauth.refresh_token}}