Skip to content
moxon home

QR Code Generation

The /qrcode endpoint generates a QR Code from a URL provided as a parameter. This endpoint is useful for quickly generating an image in PNG format.

gethttps://api.moxon.dev/v2/qrcode

Parameters

  • urlstringrequired

    The URL of the QR Code to generate. Must contain the full address

Request Example

Request
GET /v2/qrcode?url=https://moxon.dev

Response

Response
{
    "qr": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAACECAYAAABRRIOnAAAAAklEQVR4AewaftIAAAOaSURBVO3BQY5jBxYDwcwH3f/KnF7MgqsPCFKV7..."
}

cURL

cURL
curl -X GET "https://api.moxon.dev/v2/qrcode?url=https://moxon.dev"

Error Handling

If the value of url is empty, an error will be returned.