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