import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
mythictext: {
type: "app",
app: "mythictext",
}
},
async run({ steps, $ }) {
const body = "# Hello World";
const { data } = await axios($, {
method: "POST",
url: "https://mythictext-api.vercel.app/convert",
headers: {
"Content-Type": "text/plain",
"X-Output-Target": "gmail",
"X-API-Key": this.mythictext.$auth.api_key
},
data: body
});
return data;
},
})
MythicText uses API keys for authentication. When you connect your MythicText account, Pipedream securely stores the keys so you can easily authenticate to MythicText APIs in both code and no-code steps.