How can we help you?

Comment créer un QR code via l'API ?

Last updated on October 25, 2025

Exemple complet de création de QR code via API :

🔧 Requête de base (curl) : `bash

curl -X POST 'https://helvetqr.ch/api/qr/add' \

--header 'Authorization: Bearer VOTRE_CLE_API' \

--header 'Content-Type: application/json' \

--data-raw '{

"type": "link",

"data": "https://example.com",

"name": "Mon QR Code"

}'

` 📝 Paramètres disponibles :

  • type (requis) : "text", "link", "vcard", "wifi", "email", "sms", "phone"

  • data (requis) : Contenu du QR code

  • name (optionnel) : Nom du QR code

  • background (optionnel) : Couleur fond (ex: "rgb(255,255,255)")

  • foreground (optionnel) : Couleur avant-plan (ex: "rgb(0,0,0)")

  • logo (optionnel) : URL du logo à intégrer

✅ Réponse succès : `json {

"error": 0,

"id": 123,

"link": "https://helvetqr.ch/qr/abc123"

} ` ❌ Réponse erreur : `json {

"error": 1,

"message": "Invalid API key"

} ` 🐍 Exemple Python : `python

import requests

url = "https://helvetqr.ch/api/qr/add"

payload = {

"type": "link",

"data": "https://example.com",

"name": "Mon QR Code"

}

headers = {

'Authorization': 'Bearer VOTRE_CLE_API',

'Content-Type': 'application/json'

}

response = requests.post(url, headers=headers, json=payload)

print(response.json())

`

Documentation complète : https://helvetqr.ch/developers

Did not answer your question?
Contáctanos