Generate a QR Code
/
https://us.stannp.com/api/v1/qrcode/create
Creates a QR code image.
You must use a PUBLIC KEY for this request. You can create a public key here
QRcodes may need to be embedded as URLs into an image source. So we recommend using a querystring to pass over the parameters for this.
Parameters
size | int | Optional. The size in pixels of the QR code. |
data | string | The content you wish the QRcode to contain. |
Request
$ curl https://dash.stannp.com/api/v1/qrcode/create?size=300&data=hello+world \ -u {API_KEY}:
define("API_KEY", "YOUR API KEY"); $opts = array( 'http' => array( 'method' => 'GET', 'header' => 'Content-type: application/x-www-form-urlencoded' ) ); $context = stream_context_create($opts); $result = file_get_contents("https://dash.stannp.com/api/v1/qrcode/create?size=300&data=hello+world?api_key=" . API_KEY, false, $context); $response = json_decode($result, true); print_r($response);
import requests response = requests.get('https://dash.stannp.com/api/v1/qrcode/create?size=300&data=hello+world?api_key={API_KEY}') print(response.text)
var client = new RestClient("https://dash.stannp.com/api/v1/qrcode/create?size=300&data=hello+world?api_key={API_KEY}"); var request = new RestRequest(Method.GET); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content);Response