Ir al contenido
v2.7

Obtener código QR

Converts a given plain text to a QR code image.

GET/avatars/qrAlcance avatars.read

Converts 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.

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.

200Éxito
400Parámetro inválido o faltante
401Sin sesión, sin permiso en el recurso o clave sin el alcance
429Límite de peticiones

Todo 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);
Respuesta200 OK

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.

¿Te ayudó esta página?