/avatars/qrScope 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.
Parameters
Section titled “Parameters”text string required
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.
Access: API key with the avatars.read scope or no key or session: the project ID is enough.
Responses
Section titled “Responses”200Success400Invalid or missing parameter401No session, no permission on the resource or key without the scope429Rate limitEvery error comes as JSON with code, type and message: see Errors.
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>"No response body.
The descriptions on this page come from the server API specification (BSD-3-Clause license), and the examples come from the SDK generator (MIT license). The full notices are in the NOTICE file of the @owbase/web and @owbase/node packages.