Skip to Content

QR Code

Generate a QR code PNG image for any page URL.

GET /api/qr/:username/:slug

Authentication

None required. This is a public endpoint.

Path parameters

ParameterTypeDescription
usernamestringThe page owner’s username
slugstringThe page slug

Response

Status: 200 OK

Returns a PNG image (Content-Type: image/png).

  • Size: 400x400 pixels
  • Colors: Black on white
  • Margin: 2px
  • Cache: public, max-age=86400 (24 hours)

Usage

The QR code URL is included in page creation responses:

{ "page": { "qrCodeUrl": "https://chatblocks.app/api/qr/yourname/my-page" } }

You can also construct the URL yourself:

https://chatblocks.app/api/qr/{username}/{slug}

The QR code encodes the page URL: https://chatblocks.app/{username}/{slug}

Last updated on