import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
botsonic: {
type: "app",
app: "botsonic",
}
},
async run({steps, $}) {
const data = {
"input_text": `{{your_input_text}}`, //E.g. How to develop these skills?
"chat_id": `{{your_chat_id}}`, //E.g. 9f2569da-ba86-4a88-a4c0-9932a91bedf4
}
return await axios($, {
method: "post",
url: `${this.botsonic.$auth.generate_endpoint}`,
headers: {
"token": `${this.botsonic.$auth.api_key}`,
"Accept": `application/json`,
"Content-Type": `application/json`,
},
data,
})
},
})
Botsonic uses API keys for authentication. When you connect your Botsonic account, Pipedream securely stores the keys so you can easily authenticate to Botsonic APIs in both code and no-code steps.
Sign in and go to one of your bots under "Your Bots", hit "View bot". Get your API Token from the "Connect" > "REST API".