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

x_passphrase field missing from response #129

Closed NickDunas closed 2 years ago

NickDunas commented 2 years ago

I noticed that the x_passphrase is missing from the response I get from our controllers. I contacted ubiquity help center, but they cannot help me. I see that passphrase does exist on the responses on UniFi API Browser demo. Any ideas what I might be doing wrong?

malle-pietje commented 2 years ago

Please share more information:

malle-pietje commented 2 years ago

Do not expect support from Ubiquiti for API-related matters...

NickDunas commented 2 years ago

Thank you for your response!

API client version: v1.1.70

Code snippet:

$client = new UnifiClient($username, $password, $url, $site->unifi_name);
$client->login();
$data = $client->list_wlanconf();

I haven't tried installing the API browser locally as I see that it will just use the API Client to call the same list_wlanconf command. Do you suggest giving it a try in any case?

malle-pietje commented 2 years ago

OK, that code looks fine. Yes, installing the API browser will be useful anyways and give you fast and easy access to most of the API endpoints.

In the output you get do you see a value for the wpa_mode key?

NickDunas commented 2 years ago

Yes it is wpa2

malle-pietje commented 2 years ago

Ok, in that case I suspect it’s a controller related issue. Which version are you running? Please also confirm what the output from the API Browser tool is, and please check as many sites and controllers as possible.