import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
insertchat: {
type: "app",
app: "insertchat",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.insertchat.com/v1/${this.insertchat.$auth.app_uid}/accounts`,
headers: {
Authorization: `Bearer ${this.insertchat.$auth.oauth_access_token}`,
},
})
},
})
Pushes a new message into an existing chat session in InsertChat. See the documentation
InsertChat uses OAuth authentication. When you connect your InsertChat account, Pipedream will open a popup window where you can sign into InsertChat and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any InsertChat API.
Pipedream requests the following authorization scopes when you connect your account:
POST
https://api.insertchat.com/v1/auth/access
content-type: application/x-www-form-urlencoded
accept: application/json
email={{custom_fields.email}}
&
password={{custom_fields.password}}
POST
https://api.insertchat.com/v1/auth/access
email={{custom_fields.email}}
&
password={{custom_fields.password}}