QR Code Generator API
Introduction
This is a simple QR code generator api that uses the php-qrcode library.
Usage
To use this api, just send a GET request to the following endpoint:
https://api.jm26.net/qr-code/
For example, if you want to generate a QR code for the text API.JM26.NET
, you can send a GET request to the following url:
curl -X GET "https://api.jm26.net/qr-code/?d=API.JM26.NET"
The response will be this image:
Parameters
Parameter | Description | Default | Required |
---|---|---|---|
d | The data to encode | API.JM26.NET | ✔️ |
s | The size | 300 | ❌ |
w | The width | 150 | ❌ |
h | The height | 150 | ❌ |
bc | The background color | #ffffff | ❌ |
fc | The foreground color | #000000 | ❌ |
sf | The scale factor | 4 | ❌ |
sx | The horizontal scale factor | - | ❌ |
sy | The vertical scale factor | - | ❌ |
p | The padding | 0 | ❌ |
pv | The vertical padding | - | ❌ |
ph | The horizontal padding | - | ❌ |
pt | The top padding | - | ❌ |
pl | The left padding | - | ❌ |
wq | The width of the quiet area | 1 | ❌ |
wm | The width of the narrow modules and spaces | 1 | ❌ |
Simple UI
You can also use the simple ui to generate QR codes. This is a very basic UI that allows you to generate QR codes with the default parameters.