LOA Template Download

Learn how to create a PDF in Node.js for Telnyx Porting LOA API. See Telnyx guidance and requirements.

How to Create a PDF in Node.js for Telnyx Porting LOA API

If you need to use the Telnyx API capabilities for porting then you will need to be able to download LOA Template PDFs. Here is an example of a request you can send you may start working on functionality for Porting numbers by API. A step you may run into

PDF made with Node example

'use strict' const Fs = require('fs') const Path = require('path') const Axios = require('axios') async function downloadPDF () { const url = 'https://api.telnyx.com/v2/porting_orders/{porting_id}/loa_template' const path = Path.resolve(__dirname, `test.pdf`) const writer = Fs.createWriteStream(path) const response = await Axios({ url, method: 'GET', responseType: 'stream', headers: { "Content-Type": "application/json", Accept: "application/json", Authorization:"Bearer API_KEY", } }) // console.log(response.data); response.data.pipe(writer) return new Promise((resolve, reject) => { writer.on('finish', resolve) writer.on('error', reject) }) } downloadPDF()

Related articles

Automating Ports With Programmatic APIRevolutionize your porting process using the Documents API. See Telnyx guidance and requirements Learn more about Automating Ports With Programmatic API with.Auto-generated Letter of Authorization (LOA)Learn more about using auto-generated LOA's to simplify your porting… See Telnyx guidance and requirements.US / CA Toll Free Number PortingHere you will find a detailed list of requirements for Toll Free number… See Telnyx guidance and requirements.Porting + BundlesLearn how to pre-configure your porting order with Bundles. See Telnyx guidance and requirements Learn more about Porting + Bundles with Telnyx.