import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
magicalapi: {
type: "app",
app: "magicalapi",
}
},
async run({steps, $}) {
const data = {
"profile_name": `williamhgates`,
}
return await axios($, {
method: "post",
url: `https://gw.magicalapi.com/profile-data`,
headers: {
"content-type": `application/json`,
"api-key": `${this.magicalapi.$auth.api_key}`,
},
data,
})
},
})
MagicalAPI uses API keys for authentication. When you connect your MagicalAPI account, Pipedream securely stores the keys so you can easily authenticate to MagicalAPI APIs in both code and no-code steps.