per l’integrazione
Un codice QR in una sola richiesta
Invia i contenuti e le impostazioni di design attraverso GET e riceve un PNG o SVG senza ulteriore controllo di scansione.
Libero e per sempre.PNG, SVG e API - nessuna tassa o abbonamenti.
Codice QR diretto. Nessuna trasmissione, nessuna scadenza.
GEThttps://qivo.umind.group/
Richiesta e autenticazione
Passare la tua chiave nell'anello X-API-Key. sessioni editoriali e cookie non sono richiesti. QIVO_API_KEY in questo esempio è una variabile di ambiente client contenente la tua chiave.
curl --fail --show-error --get 'https://qivo.umind.group/' \
--header "X-API-Key: $QIVO_API_KEY" \
--data-urlencode 'data=https://umind.group' \
--data-urlencode 'contentType=url' \
--data-urlencode 'format=svg' \
--data-urlencode 'shape=rounded' \
--data-urlencode 'size=1024' \
--output qr-code.svgSe la tua integrazione accetta solo un URL, passare la chiave nel parametro chiave:
https://qivo.umind.group/?key=YOUR_SECRET_KEY&data=https%3A%2F%2Fumind.group&format=png&size=1024Il titolo prende precedenza sul parametro chiave. URL codifica valori di parametri: # → %23, + → %2B, e & dentro un valore → %26.
Utilizzare HTTPS e tenere la chiave sul tuo server. Non metterla in JavaScript pubblico. Le chiavi e i dati nelle URL GET possono apparire nella storia del browser o nei log del server; preferisci il titolo per la tua chiave.
Esempi di codice
Mantenere la chiave nella variabile ambiente QIVO_API_KEY; non pubblicarla nel codice di pagina.
<?php
$key = getenv('QIVO_API_KEY');
if (!$key) throw new RuntimeException('Set QIVO_API_KEY');
$query = http_build_query([
'data' => 'https://umind.group', 'format' => 'svg',
'shape' => 'rounded', 'size' => 1024,
], '', '&', PHP_QUERY_RFC3986);
$curl = curl_init('https://qivo.umind.group/?' . $query);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-Key: ' . $key],
CURLOPT_TIMEOUT => 30,
]);
$image = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
curl_close($curl);
if ($image === false || $status !== 200) {
throw new RuntimeException('Qivo request failed: ' . $status);
}
file_put_contents('qr-code.svg', $image);import { writeFile } from 'node:fs/promises';
const key = process.env.QIVO_API_KEY;
if (!key) throw new Error('Set QIVO_API_KEY');
const url = new URL('https://qivo.umind.group/');
url.search = new URLSearchParams({
data: 'https://umind.group', format: 'svg',
shape: 'rounded', size: '1024'
});
const response = await fetch(url, {
headers: { 'X-API-Key': key },
signal: AbortSignal.timeout(30000)
});
if (!response.ok) throw new Error(`Qivo request failed: ${response.status}`);
await writeFile('qr-code.svg', Buffer.from(await response.arrayBuffer()));import os
from pathlib import Path
from urllib.parse import urlencode
from urllib.request import Request, urlopen
key = os.environ['QIVO_API_KEY']
query = urlencode({
'data': 'https://umind.group', 'format': 'svg',
'shape': 'rounded', 'size': 1024,
})
request = Request('https://qivo.umind.group/?' + query,
headers={'X-API-Key': key})
# urlopen raises HTTPError for unsuccessful HTTP responses.
with urlopen(request, timeout=30) as response:
Path('qr-code.svg').write_bytes(response.read())Parametri di design
| Parametri | Tipo | Requisiti | Valori |
|---|---|---|---|
X-API-Key / key | string | richiesto | chiave segreta: capo o parametro GET |
data | string | Il testo e l'URL | Contenuto richiesto per testo/url |
contentType | string | Opzionale | texturlwifivcardwhatsapptelegramphoneviberemailsmsdi default: text |
format | string | Opzionale | pngsvgdi default: png |
size | integer | Opzionale | 25651210242048di default: 1024 |
shape | string | Opzionale | squaresoftroundeddotsleaf-softleafhorizontalverticalpointednotchedstardiamondxx-roundedplusplus-roundedheartsparkleconfettidi default: square |
border | string | Opzionale | squarecircleroundedskewdrop-tldrop-brleafleaf-inner-brleaf-circleleaf-inner-tlsquare-circlesoft-tlsoft-brsoft-leafroughdi default: square |
center | string | Opzionale | squarecircleroundedskewroughdrop-tldrop-brleafgearstardiamondxx-roundedplusplus-roundedheartdi default: square |
foreground / eyeColor | string | Opzionale | #RRGGBB di default: #192b39 |
background | string | Opzionale | #RRGGBB di default: #ffffff |
level | string | Opzionale | LMQHdi default: M |
quietZone | integer | Opzionale | 0 - 12 moduli di default: 4 |
logo | string | Opzionale | nonewhatsapplinklocationwificredentialemailscanbellmenuscan-mescan-me-v2paypalbitcoinsparkplusdiamonddi default: none |
logoScale | integer | Opzionale | 12–30 di default: 24 |
I codici con un logo utilizzano automaticamente il livello H. GET supporta le icone incorporate; i file upload e gli URL di logo esterni non sono supportati.
Tipi di contenuto
I campi dipendono dal contenutoType. per gli URL, fornire un completo https:// o http:// indirizzo. per i numeri di telefono, includere il codice paese.
| contentType | I campi necessari | I campi opzionali |
|---|---|---|
| text / url | data | — |
| phone / viber | phone | — |
| whatsapp / sms | phone | message |
| telegram | telegram | — |
| subject, message | ||
| wifi | ssid; wifiSecurity≠nopass → wifiPassword | wifiSecurity (WPA), wifiHidden (0) |
| vcard | firstName / lastName | organization, jobTitle, phone, email, website, address |
https://qivo.umind.group/?key=YOUR_SECRET_KEY&contentType=phone&phone=%2B380671234567&format=svgRisposte di fuoco
Una risposta di successo è il file dell'immagine stesso, senza un taglio JSON. Il contenuto-tipo è immagine/png o immagine/svg+xml. Gli errori vengono restituiti come JSON:
{"error":"Invalid API key."}- 200 — Immagine generata .
- 401 — La chiave scomparsa o invalidata.
- 405 — GET è richiesto.
- 422 — Parametri invalidi o contenuti mancanti.
- 429 — Il limite del tasso è superato; Retry-After: 60.
- 503 — L'accesso API non è configurato o la protezione non è temporaneamente disponibile.
- 500 — errore di generazione interna.
Limiti e validità
Il limite predefinito è 60 richieste al minuto per IP. Il contenuto codificato è limitato a 800 byte. la produzione PNG supporta fino a 2048 × 2048 px. SVG conserva le forme vectorali.
L'API valida i formati di parametri, la dimensione e il contrasto, ma non esegue un decoder o verifica se i QR scansono.