Art-of-WiFi / UniFi-API-client

A PHP API client class to interact with Ubiquiti's UniFi Controller API
MIT License
1.09k stars 217 forks source link

Guest authorize -> session stays in pending state #96

Closed arjan-vdw closed 3 years ago

arjan-vdw commented 3 years ago

Hi,

First of all thank you for this awesome library!

We have an issue though. When we are authorizing a guest through the $auth_result = $unifi_connection->authorize_guest($mac, $duration, null, null, null, $ap_mac); method, the guest session stays at the pending state. Once we manually autorize the pending session in the controller, the guestclient has immediately access to the internet.

image

Is there a solution for this? Are we missing something in our script or do we need to change an setting into the controller itself?

Thank you in advance!

Arjan

malle-pietje commented 3 years ago

This function/method is the one we use most so I'm quite sure it works in a reliable fashion.

Some questions and suggestions for you:

arjan-vdw commented 3 years ago

Hi,

We found out that the site ID was not sent properly..! It's working now.

Thank you!

Arjan

malle-pietje commented 3 years ago

thanks for the feedback!