Skip to content
v2.7

Get QR code

Converts a given plain text to a QR code image.

GET/avatars/qrScope 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 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.

200Success
400Invalid or missing parameter
401No session, no permission on the resource or key without the scope
429Rate limit

Every 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);
Response200 OK

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.

Was this page helpful?