QR Code API

FREEMIUM
By Youssef dev | Updated a month ago | Tools
Health Check

N/A

README

The Flask API that generates QR code images from URL strings:

Endpoint: /generate_qr

HTTP method: GET

Query parameters:

url (required): The URL string to encode in the QR code.
Response:

The API returns a downloadable PNG file containing the generated QR code image. The file is sent as an attachment with the name “qr.png”.

Example usage:

GET /generate_qr?url=https://www.example.com

Example response:

The API response will contain a downloadable PNG file with the name “qr.png”, which the user’s browser should automatically prompt the user to download. The file will contain a high-quality QR code image that encodes the URL string specified in the url query parameter.

Dependencies:

This Flask API uses the flask and qrcode libraries for generating and serving QR code images. Make sure these libraries are installed before running the API.

Limitations:

This API only supports encoding URL strings in QR code images. It does not support encoding other types of data.
The QR code image size is fixed at 1 inch x 1 inch, with a box size of 10 and a border size of 5. These parameters can be adjusted by modifying the qr = qrcode.QRCode(version=1, box_size=10, border=5) line in the code.
This API does not provide any error handling for cases where the url query parameter is missing or invalid. It is the responsibility of the client to ensure that the url parameter is valid before sending the request.

Followers: 0
API Creator:
Rapid account: Youssef Dev
Youssef dev
bouhsiniyousef
Log In to Rate API
Rating: 5 - Votes: 1