import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
urltopdf: {
type: "app",
app: "urltopdf",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.urltopdf.net/convert`,
headers: {
"authorization": `${this.urltopdf.$auth.api_key}`,
},
params: {
url: `https://pipedream.com`,
format: `A4`,
landscape: `false`,
singlePage: `false`,
renderDelay: `0`,
},
})
},
})
UrlToPDF uses API keys for authentication. When you connect your UrlToPDF account, Pipedream securely stores the keys so you can easily authenticate to UrlToPDF APIs in both code and no-code steps.