import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
threads: {
type: "app",
app: "threads",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://trythreads.com/api/public/ping`,
headers: {
Authorization: `Bearer ${this.threads.$auth.api_key}`,
},
})
},
})
Post a message to a chat. First, make sure you add your Bot user to the chat. See the Documentation
Threads uses API keys for authentication. When you connect your Threads account, Pipedream securely stores the keys so you can easily authenticate to Threads APIs in both code and no-code steps.
You can create a new API key and find your existing keys at https://trythreads.com/apiKeys
When you create a new API key, we create a new Bot user for the key. The Bot user has the same posting privileges as any member in your organization.