import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
upgrade_chat: {
type: "app",
app: "upgrade_chat",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.upgrade.chat/v1/orders`,
headers: {
Authorization: `Bearer ${this.upgrade_chat.$auth.token}`,
"accept": `application/json`,
},
})
},
})
Emit new event when an order is created. See the documentation
Emit new event when a product is created. See the documentation
Emit new event when an order is updated. See the documentation
Emit new event when a product is updated. See the documentation
Upgrade.chat uses OAuth authentication. When you connect your Upgrade.chat account, Pipedream will open a popup window where you can sign into Upgrade.chat and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Upgrade.chat API.
Pipedream requests the following authorization scopes when you connect your account:
POSThttps://api.upgrade.chat/oauth/tokenaccept: application/jsonclient_id={{custom_fields.client_id}}&client_secret={{custom_fields.client_secret}}&grant_type=client_credentialsPOSThttps://api.upgrade.chat/oauth/tokenaccept: application/jsonclient_id={{custom_fields.client_id}}&client_secret={{custom_fields.client_secret}}&grant_type=client_credentials