Get Smart Ticket QR code
GET
{{server}}/api/v1/dispenser/smartTicketQrCodeThis endpoint returns the Smart Ticket QR code as a PNG image. It's a dynamic QR code, you should recall it to get a fresh one before the expiration. The expiration is in the validityTime property in the settings response.
Request
Authorization
| Header | Value |
|---|---|
Authorization | Apikey {{dispenserApikey}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{dispenserWsID}} |
Code snippets
- cURL
- JavaScript
- Python
curl -X GET '{{server}}/api/v1/dispenser/smartTicketQrCode' \
-H 'Accept: application/json' \
-H 'X-WSID: {{dispenserWsID}}' \
-H 'Authorization: Apikey {{dispenserApikey}}'
const response = await fetch("{{server}}/api/v1/dispenser/smartTicketQrCode", {
method: "GET",
headers: {
"Accept": "application/json",
"X-WSID": "{{dispenserWsID}}",
"Authorization": "Apikey {{dispenserApikey}}"
},
});
const data = await response.json();
console.log(data);
import requests
url = "{{server}}/api/v1/dispenser/smartTicketQrCode"
headers = {
"Accept": "application/json",
"X-WSID": "{{dispenserWsID}}",
"Authorization": "Apikey {{dispenserApikey}}"
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())