import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
lessaccounting: {
type: "app",
app: "lessaccounting",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.lessaccounting.$auth.business}.lessaccounting.com/businesses/get_businesses.json`,
headers: {
"Accept": `application/json`,
},
auth: {
username: `${this.lessaccounting.$auth.email}`,
password: `${this.lessaccounting.$auth.password}`,
},
params: {
api_key: `${this.lessaccounting.$auth.api_key}`,
},
})
},
})
LessAccounting uses API keys for authentication. When you connect your LessAccounting account, Pipedream securely stores the keys so you can easily authenticate to LessAccounting APIs in both code and no-code steps.
To retrieve your API Keys,
Your business is 1234
if your LessAccounting dashboard URL is https://1234.lessaccounting.com/
LessAccounting requires their users enter their LessAccounting email and password in order to connect to their API. For more info, refer to LessAccounting’s documentation.
Pipedream recommends using a strong and unique password for your LessAccounting account.