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}`,
},
})
},
})
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.