import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
wit_ai: {
type: "app",
app: "wit_ai",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.wit.ai/message?v=20170307&q=hello`,
headers: {
Authorization: `Bearer ${this.wit_ai.$auth.app_token}`,
},
})
},
})
wit.ai uses API keys for authentication. When you connect your wit.ai account, Pipedream securely stores the keys so you can easily authenticate to wit.ai APIs in both code and no-code steps.
In Wit.AI, the API key are available Settings menu on the top right. This is explained in step 5 "Query your app" of the Quickstart.