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

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

Scheduled Pinned Locked Moved Captive Portal
5 Posts 2 Posters 693 Views
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 Jul 25, 2020, 6:46 PM

    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 Jul 26, 2020, 1:16 PM

      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 Jul 26, 2020, 1:38 PM

        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
        • G
          Gertjan
          last edited by Gertjan Jul 27, 2020, 5:23 AM Jul 27, 2020, 5:21 AM

          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 Jul 27, 2020, 9:18 AM Reply Quote 0
          • C
            coder @Gertjan
            last edited by Jul 27, 2020, 9:18 AM

            @Gertjan Okey, thanks. I will do that.

            1 Reply Last reply Reply Quote 0
            1 out of 5
            • First post
              1/5
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
              This community forum collects and processes your personal information.
              consent.not_received