import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
kobotoolbox: {
type: "app",
app: "kobotoolbox",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.kobotoolbox.$auth.region}.kobotoolbox.org/api/v2/assets.json`,
headers: {
"authorization": `Token ${this.kobotoolbox.$auth.api_key}`,
},
})
},
})
KoboToolbox uses API keys for authentication. When you connect your KoboToolbox account, Pipedream securely stores the keys so you can easily authenticate to KoboToolbox APIs in both code and no-code steps.