Node wrapper for the lob QR Code Gen
npm install @lob/qr-codeLob QR Codes for Node.js
``typescript
import { QRCode } from '@lob/qr-code';
const qrcodeCreator = new QRCode({
api_key: '
logger: new LobLogger(),
env: 'production',
});
const qrcode = await qrcodeCreator.create(
/ request body /
{
redirect_link: '
size: 1,
slug: '
logo: { url: '
style: { color: { background: '#ffffff', foreground: '#000000' } }, // optional
domain: '
}, / params / {
account_id: '
resource_id: '
object_type: '
// get a base64 encoded data url of the image in the desired format
qrCode.toDataUrl('image/png');
``