Skip to main content

API endpoint to create a QR Code

Status: Completed5 comments

Log in to comment and vote

Comments5

  • Hugo

    Team•

    Jun 16, 2024

    Good news, QR Code API is there!

    You have two methods to generate QR Codes using our API:

    1. Using the "Creation link" endpoint:

      • Endpoint: Create Link Endpoint

      • Returns: Base64-encoded data URL.

      • Usage: You can directly embed this data URL into an HTML <img> tag to display the QR code. Alternatively, you can convert this data into a file on your system.

    2. Using the dedicated "QR Code" endpoint:

      • Endpoint: Create QR Code Endpoint

      • Returns: Binary file.

      • Usage: Download the QR code directly as a file. This method is suitable if you prefer handling QR codes as downloadable assets.

    Both endpoints allow customization of QR code size, format, and colors.

    You'll have noticed that there's no return with a hosted url. We made this choice not because it wasn't possible, but because we don't think that's it's a good idea at the moment. In terms of reliability and trust, and so as not to vendor-lock yourself, it's best if you either have the QR Code on your side after downloading it, or if you use the base64 string directly to display the QR Code without needing a file.

    We believe this approach minimizes vendor lock-in and supports your long-term integration strategies.

    Hope it works for you!

    • Alex Hannibalsen

      •

      Jun 17, 2024

      Perfect! Thank you so much! :)

  • Alex Hannibalsen

    •

    Jun 10, 2024

    In addition to the API providing the short URL, then we would like it to provide a QR code as well. This could be a hosted PNG image – 1200 pixels x 1200 pixel

    • Hugo

      Team•

      Jun 10, 2024

      You mean the QR Code url should be returned from the “Create a link” endpoint response?

      I was thinking more of an additional dedicated “QR Code” endpoint.

      For format and size I think these will be two parameters of the endpoint so it will be supported without problem.

      • Alex Hannibalsen

        •

        Jun 10, 2024

        Yes, I suggest it to be included in the "create a link" endpoint. Along with the short URL itself. Creating a dedicated endpoint can also work, but it will make it slightly more difficult on our end, as our dev team would need to do some additional work with connecting the Saxo UI to this endpoint as well. I leave it up to you :)

        If format and size can be defined, then that is also good.