QR Codes
With OneSimpleApi.com you can create QR codes with ease.
Our QR code generator allows you to create them with perfect quality and just one simple request. You donβt need to write complex logic for your apps and projects. Let OneSimpleApi handle it and focus on what's your core business.
Just follow these instructions, and you'll be creating the best QR Codes in no time.
Common use cases
- QR Codes for website links
- QR Codes for restaurant menu.
- QR Codes to streamline a process.
- QR Codes to enhance your visitors experience on events and venues.
Prerequisites
Before you start building with OneSimpleApi, youβll need to signup and create an access Token. Make sure that your token has this feature enabled!
Once you have your Token ready, to create a QR you will need:
- The Message that you want to add to your code. It can be a Link, Phone Number or even a simple text.
How to use the QR Code API?
This API URL is: https://onesimpleapi.com/api/qr_code
Example using the QR Code API
In this example, we use the API to generate a QR Code with a link to our website.
Options
Sometimes, the QR Code API default settings are not precisely what you need; in those cases, here are some extra options to make your QR glow!
To use any option, simply add it to the URL. You can add them in any order and as many as you need.
&size
This option allows you to define the size of your QR Code. The available qr code sizes are: Small, Medum & Large.
https://onesimpleapi.com/api/qr_code?token=YOUR_TOKEN_GOES_HERE&output=redirect&size=large&message=https://www.google.com
&format=svg
By default the API will create a PNG image with the QR Code, if you rather have a vector SVG file, add this option.
https://onesimpleapi.com/api/qr_code?token=YOUR_TOKEN_GOES_HERE&output=redirect&format=svg&message=https://www.google.com
&color and &background
QR Codes can be configured by using &color for the foreground, and &background for the background colors. You can provide a hex value like &color=#ffccdd, an RGB value like &color=rgb(255,20,10), or an RGBA value like &color=rgba(255,20,10,0.5).
https://onesimpleapi.com/api/qr_code?token=YOUR_TOKEN_GOES_HERE&output=redirect&color=rgb(255,20,10)&message=https://www.google.com
&output
Depending on your use case, you might need the response to be in a particular format. By default, the API returns a text with the URL of the QR Code.
Value | Details | Sample |
---|---|---|
text | The response is a text with the link to the QR Code. | https://onesimpleapi.com/api/qr_code?token=YOUR_TOKEN_GOES_HERE&output=text&message=https://www.google.com |
redirect | The response redirects the user to the QR Code. This is useful when you want to put it directly on your HTML code | https://onesimpleapi.com/api/qr_code?token=YOUR_TOKEN_GOES_HERE&output=redirect&message=https://www.google.com |
csv | The response is a CSV file, resulting with the following columns: URL, Elapsed | https://onesimpleapi.com/api/qr_code?token=YOUR_TOKEN_GOES_HERE&output=csv&message=https://www.google.com |
for_google_docs | The response is specially crafted to be interpreted by a Google Spreadsheet using the IMPORTDATA function, resulting in the following columns: URL, Elapsed. | https://onesimpleapi.com/api/qr_code?token=YOUR_TOKEN_GOES_HERE&output=for_google_docs&message=https://www.google.com |
json | This is the output you should use if you're using the API from a programming language. | https://onesimpleapi.com/api/qr_code?token=YOUR_TOKEN_GOES_HERE&output=json&message=https://www.google.com |
Complex URLs
If your URL is complex or has the following symbols: &, ?, / you need to encode it to make sure the API receives it complete. If you're trying to use the API but not getting the result you expect this might be the issue.