delian / node-unifiapi

UniFi API ported to Node.JS
GNU General Public License v3.0
49 stars 19 forks source link

Authentication Error #19

Open rymoore opened 5 years ago

rymoore commented 5 years ago

I have a Unifi Controller installation that I have not previously configured (just installed on an Ubuntu server). When attempting to login with unifi.login('ubnt', 'ubnt'), I'm getting the following error:

Error "Authentication error [object Object]"

Should I be able to log in using this API before I've configured the location using the web UI? If so, is there any way I can get more detailed information about the error?

Note: Once I set up a username/pw through the Web UI, I am able to login successfully.

rymoore commented 5 years ago

I've now been able to authenticate successfully by adding a new Admin user to the Admin collection in Mongodb. The issue now is that the new user doesn't seem to be associated to the "default" site... "No Site Context" is the error I'm now seeing. Any suggestions how to associate the new user with the default site?