You can create a QR code on the fly with a URL GET request.
QR code requests support the following URL query parameters after the ? in the root URL:
Overview
QR codes are a popular type of two-dimensional barcode. They are also known as hardlinks or physical world hyperlinks. QR Codes store up to 4,296 alphanumeric characters of arbitrary text. This text can be anything, for example URL, contact information, a telephone number, even a poem! QR codes can be read by an optical device with the appropriate software. Such devices range from dedicated QR code readers to mobile phones.Syntax
Root URL:https://chart.googleapis.com/chart?
QR code requests support the following URL query parameters after the ? in the root URL:
Parameter | Required or Optional | Description |
---|---|---|
cht=qr | Required | Specifies a QR code. |
chs=<width>x<height> | Required | Image size. |
chl=<data> | Required | The data to encode. Data can be digits (0-9), alphanumeric characters, binary bytes of data, or Kanji. You cannot mix data types within a QR code. The data must be UTF-8 URL-encoded. Note that URLs have a 2K maximum length, so if you want to encode more than 2K bytes (minus the other URL characters), you will have to send your data using POST. |
choe=<output_encoding> | Optional | How to encode the data in the QR code. Here are the available values:
|
chld=<error_correction_level>|<margin> | Optional |
|
Example:
https://chart.googleapis.com/chart?cht=qr&chl=Hello+world&choe=UTF-8&chs=200x200
No comments:
Post a Comment