Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Nature of the voucher database, is it possible to fetch vouchers from rolls

    Captive Portal
    2
    5
    674
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      coder
      last edited by

      Hi,

      Is possible to access the pfsense voucher database externally? For ex. from an internal highly secured web page on a secured LAN, where I could fetch vouchers from rolls and automatically create qr codes from them? Making it more easy for visitiors to enter login in captive portal.

      The idea is to fetch the voucher token, with custom info with url, for ex. https://captivelogin.mydomain.local/getVoucherFromRoll.php?rollid=1234

      1 Reply Last reply Reply Quote 0
      • C
        coder
        last edited by

        As stated in pfsense docs it should be possible to stear user to an url implmenting access for vouchers from pfsense, and there create an qr code, sending user to pre filled in authentication page with a fetched voucher from pfsense!?

        Has enyone tried to do this?

        1 Reply Last reply Reply Quote 0
        • C
          coder
          last edited by

          Do one need to store vouchers locally from exported excel document, or is there any api to pfsense that can fetch vouchers from rolls?

          1 Reply Last reply Reply Quote 0
          • GertjanG
            Gertjan
            last edited by Gertjan

            Not a real API.

            But ones a roll is created, you have the possibility to export it into an Excel or SCV file, ans this can be done as often as you want.
            That is, this file file show you all the vouchers, the available ones, and the used ones.
            There is another file to be parsed that lists the used vouchers.

            Normally, you export the voucher rolls ones, and then you mark every vouchers as "used" as soon as you give one to someone. This marking can also be done automatically if you script things on your side.

            The API is plain PHP code : just see how pfSense makes the voucher roll for you.
            The create your own script based of that.

            No "help me" PM's please. Use the forum, the community will thank you.
            Edit : and where are the logs ??

            C 1 Reply Last reply Reply Quote 0
            • C
              coder @Gertjan
              last edited by

              @Gertjan Okey, thanks. I will do that.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.