Skip to main content
Data
The value to be encoded into the QR code. It can be any valid JavaScript value (object, string, number, etc.). It will be automatically converted to a string using JSON.stringify.
Options (optional)
You can provide custom options to control the appearance and behavior of the QR code. Some useful options include:
  • errorCorrectionLevel: 'L' | 'M' | 'Q' | 'H' – Error correction capability (default: 'M')
  • margin: number – Margin around the QR code in modules
  • scale: number – Scale factor for the image size
  • width: number – Fixed width of the QR code
For a full list of available options, refer to the qrcode options documentation. Returns
A Promise<string> that resolves to a Data URL representing the QR code image in PNG format.
Sending an object
Sending an URL
📧 Sending the QR Code via Email You can send the generated QR code either as an attachment or inline image in the email body using the sendEmail utility. ✅ Option 1: Send as an Attachment
✅ Option 2: Send as Inline Image in the Email Body