How to make api calls to create plans and vouchers

Hello once again everyone, I want to know if there is a way to create plans and generate voucher under them without using the API keys from the CnMaestro X. The CnMaestro X is too expensive hence I need alternate ways. Whenever I use the endpoints to generate vouchers I get the below message

{
“error”: {
“code”: “INVALID_CSRF”,
“message”: “Form tampered with BAD REQUEST”
}
}

Kindly help me overcome this issue.

Please don’t ignore me. My boss’s on my neck.

You can do what you want from cnMaestro Essentials - you do not need cnMaestroX.

  1. Create WLAN’s with SSID and the speed limitations you want. You need to create a separate WLAN for every different speed setting…you can only have one speed setting per WLAN.
  2. Create an AP group with all the details you need.
  3. Add the WLAN’s to the AP group.
  4. Enable guest access
  5. Create the hotspot.
  6. After the hotspot is created, generate as many vouchers as you need. They have a default expiry date, so make sure you set the expiry date to the length of time you want the voucher valid.

Since I’m not sure of your application, I can’t give any more details than this. From your cnMaestro account, you have access to the online manual, and it has all these details and much more which can address your specific situation.

Hope this helps.

I am trying to generate vouchers and create plans through API calls not by manually creating or generating them. So far the API calls work for the ‘GET method’ where I can call the number of exisiting portals as well as their plans and their respective vouchers but I can’t seem to ‘POST method’ create new plans and vouchers through API calls.

Never mind I figured out an alternative solution. Thanks