import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
plentyone: {
type: "app",
app: "plentyone",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://p${this.plentyone.$auth.id}.my.plentysystems.com/rest/user`,
headers: {
Authorization: `Bearer ${this.plentyone.$auth.oauth_access_token}`,
},
})
},
})
PlentyONE uses OAuth authentication. When you connect your PlentyONE account, Pipedream will open a popup window where you can sign into PlentyONE and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any PlentyONE API.
Pipedream requests the following authorization scopes when you connect your account:
POST
https://p{{custom_fields.id}}.my.plentysystems.com/rest/login
accept: application/json
username={{custom_fields.username}}
&
password={{custom_fields.password}}
POST
https://p{{custom_fields.id}}.my.plentysystems.com/rest/login/refresh
accept: application/json
refresh_token={{custom_fields.refreshToken}}