import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
csvbox: {
type: "app",
app: "csvbox",
}
},
async run({steps, $}) {
const data = {
"import": {
"public_file_url": "https://support.staffbase.com/hc/en-us/article_attachments/360009197011/username-password-recovery-code.csv",
"sheet_license_key": `${this.csvbox.$auth.sheet_license_key}`,
"user": {
"user_id": "your_user_id" //UserID is identifies any person who uses your application.
}
}
}
return await axios($, {
method: "post",
url: `https://api.csvbox.io/1.1/file`,
headers: {
"content-type": `application/json`,
"x-csvbox-api-key": `${this.csvbox.$auth.api_key}`,
},
data,
})
},
})
CSVbox uses API keys for authentication. When you connect your CSVbox account, Pipedream securely stores the keys so you can easily authenticate to CSVbox APIs in both code and no-code steps.