import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
eaccounting: {
type: "app",
app: "eaccounting",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://eaccountingapi.vismaonline.com/v2/companysettings`,
headers: {
Authorization: `Bearer ${this.eaccounting.$auth.oauth_access_token}`,
},
})
},
})
Visma eAccounting uses OAuth authentication. When you connect your Visma eAccounting account, Pipedream will open a popup window where you can sign into Visma eAccounting and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Visma eAccounting API.
Pipedream requests the following authorization scopes when you connect your account:
ea:apiea:salesea:purchaseea:accountingvls:apioffline_accessGEThttps://identity.vismaonline.com/connect/authorize?client_id={{oauth.client_id}}&redirect_uri={{oauth.redirect_uri}}&state={{oauth.state}}&response_type=code&scope={{oauth.space_separated_scopes}}&prompt=select_account&acr_values=service:44643EB1-3F76-4C1C-A672-402AE8085934POSThttps://identity.vismaonline.com//connect/tokencontent-type: application/x-www-form-urlencodedaccept: application/jsonredirect_uri={{oauth.redirect_uri}}&grant_type=authorization_code&code={{oauth.code}}POSThttps://identity.vismaonline.com//connect/tokencontent-type: application/x-www-form-urlencodedaccept: application/jsongrant_type=refresh_token&refresh_token={{oauth.refresh_token}}