Hello 👋
We have released free and developer friendly Qrcode generator Api
Our api is super simple to intergrate and developer friendly.
Here is a step by step guide on how to use the api
const BaseUrl = "https://real-qr-code-generator-and-api.vercel.app/"
{"{baseUrl}"}/api/v1/generateQrCode?input={inputText}
&background=$
{"{backgroundColor}"}&foreground={foregroundColor}
inputText
: The text to be encoded in the QR code.backgroundColor
: The background color of the QR code.foregroundColor
: The foreground color of the QR code.const response = await fetch('"baseUrl"/api/v1/generateQrCode?input={inputText}&background={backgroundColor}&foreground={foregroundColor}');
const data = await response.json();
The API will return a JSON object containing the generated QR code image URL.
{
"qrCode": "data:image/png;base64,iVBORw0KG..."
}
Handle errors gracefully by checking the response status and displaying appropriate messages.
if (!response.ok) {
console.error('Error:', response.status);
// Handle error display or retry logic
}
Note: Make sure to replace {inputText}
, {backgroundColor}
, and {foregroundColor}
with your desired values.