with Shutterstock and Orimon?
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
shutterstock: {
type: "app",
app: "shutterstock",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.shutterstock.com/v2/user`,
headers: {
Authorization: `Bearer ${this.shutterstock.$auth.oauth_access_token}`,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
orimon: {
type: "app",
app: "orimon",
}
},
async run({steps, $}) {
const data = {
"type": "message",
"info": {
"psid": "541013_3eea0304-5e9d-437e-82a3-9e77af6f15ea",
"sender": "user",
"tenantId": "${this.orimon.$auth.tenant_id}",
"platformName": "web"
},
"message": {
"id": "${this.orimon.$auth.tenant_id}",
"type": "text",
"payload" : {
"text": "What is Pipedream?"
}
}
}
return await axios($, {
method: "post",
url: `https://channel-connector.orimon.ai/orimon/v1/conversation/api/message`,
headers: {
"Authorization": `apiKey ${this.orimon.$auth.api_key}`,
},
data,
})
},
})