/avatars/qrAlcance avatars.readConverts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.
Parámetros
Sección titulada «Parámetros»text string obligatorio
Plain text to be converted to QR code image.
size number
QR code size. Pass an integer between 1 to 1000. Defaults to 400.
margin number
Margin from edge. Pass an integer between 0 to 10. Defaults to 1.
download boolean
Return resulting image with ’Content-Disposition: attachment ’ headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.
Acceso: clave de API con el alcance avatars.read o sin clave ni sesión: basta el ID del proyecto.
Respuestas
Sección titulada «Respuestas»200Éxito400Parámetro inválido o faltante401Sin sesión, sin permiso en el recurso o clave sin el alcance429Límite de peticionesTodo error llega como JSON con code, type y message: consulta Errores.
import { Client, Avatars } from '@owbase/web';
const client = new Client() .setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>'); // Your project ID
const avatars = new Avatars(client);
const result = avatars.getQR({ text: '<TEXT>', size: 1, // optional margin: 0, // optional download: false, // optional});
console.log(result);import { Client, Avatars } from '@owbase/node';
const client = new Client() .setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID .setSession(''); // The user session to authenticate with
const avatars = new Avatars(client);
const result = await avatars.getQR({ text: '<TEXT>', size: 1, // optional margin: 0, // optional download: false, // optional});curl -G "https://cloud.owbase.dev/v1/avatars/qr" \ -H "X-Owbase-Project: <PROJECT_ID>" \ -H "X-Owbase-Key: $OWBASE_API_KEY" \ --data-urlencode "text=<TEXT>"Sin cuerpo en la respuesta.
Las descripciones de esta página vienen de la especificación de la API del servidor (licencia BSD-3-Clause), en inglés, y los ejemplos vienen del generador de SDKs (licencia MIT). Los avisos completos están en el archivo NOTICE de los paquetes @owbase/web y @owbase/node.