module.exports = defineComponent({
props: {
pizzly: {
type: "app",
app: "pizzly",
}
},
async run({steps, $}) {
const fetch = require('node-fetch')
const { host, secretKey } = this.pizzly.$auth
const authentication = 'Basic ' + Buffer.from(secretKey + ':').toString('base64')
// Make a test API request to Pizzly. Should return a success message
return await (await fetch(`https://${host}/api/`, { headers: { "Authorization": authentication } })).json()
},
})
Pizzly uses API keys for authentication. When you connect your Pizzly account, Pipedream securely stores the keys so you can easily authenticate to Pizzly APIs in both code and no-code steps.
Please enter the host portion of your Pizzly instance (e.g. pizzly.pipedream.com
), as well as the secret key you've configured in Pizzly, below.