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