import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
typeflo: {
type: "app",
app: "typeflo",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.typeflo.$auth.api_url}/api/headless/content/posts`,
headers: {
Authorization: `Bearer ${this.typeflo.$auth.content_api_key}`,
},
})
},
})
Typeflo uses API keys for authentication. When you connect your Typeflo account, Pipedream securely stores the keys so you can easily authenticate to Typeflo APIs in both code and no-code steps.
Had to define a post for test request not to error out.
subdomain could have been defined as alternative custom field to api url, but the entire api url is displayed upon api keys creation alongside content, admin api keys.