Use a REST API to generate QR codes
This page focuses on HTTP integration: endpoints, authentication, responses and quota handling inside your application.
For teams calling MassQR from Python, Node.js, PHP, Java, Go, ERP systems or no-code HTTP tools.
- Standard HTTP
- Bearer token
- Binary SVG/PNG responses
- ZIP batches
- Clear 401/402/413/422 errors
A clear path from source data to QR assets
1. Authenticate
Add Authorization: Bearer mqk_YOUR_KEY.
2. POST a payload
Send QR content and options as JSON.
3. Read balance headers
Track remaining API units after renders.
4. Handle errors
Support invalid keys, insufficient quota, oversized batches and invalid payloads.
Core REST endpoints
A simple example showing how source data stays linked to the generated QR asset.
| Method | Route | Purpose |
|---|---|---|
GET | /v1/customer/usage | API balance |
POST | /v1/customer/qrcode.svg | SVG rendering |
POST | /v1/customer/payload/compose | Wi-Fi/vCard composition |
Build a robust integration
Keep API keys out of public source code and rotate them if exposed.
Monitor remaining units before reaching zero.
For million-scale workflows, split work according to your infrastructure instead of sending an enormous single HTTP request.
Frequently asked questions
Which HTTP status indicates insufficient quota?
MassQR returns HTTP 402 when the available API units do not cover the requested render.
Can I compose Wi-Fi QR data without writing WIFI: syntax?
Yes. The payload composition endpoint accepts structured fields and returns a normalized QR payload.