Create user/admin account? #171
-
I've installed the Client class and successfully got it returning data. One of my key aims is to be able to automate the creation of customer user accounts with a pincode (which gives access to my Unifi Access Reader Pro door access), which currently I can do only via the web UI. I can't see anything that looks like it does this in the API or in this class - indeed find_all_admins() returns only those users with admin privilege, whereas in the web UI the 'Admins' page shows all users, including my customers (who aren't actually admins). Is this something that anyone has looked into? Presumably if the web UI can do it, the API must be capable of supporting the function? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
OK so I've figured it out. Using Postman Interceptor I've found that the endpoint is https://udmp/proxy/access/api/v2/user - note not a mistake, it's formed differently from the usual /proxy/network(/v2/api) structure for UnifiOS machines. I have successfully managed to create a user with a PIN. The only validation seems to be that the PIN must be unique, but I don't think there's any way to discover this without trying to create one. |
Beta Was this translation helpful? Give feedback.
-
Hmm, too bad there’s lack of consistency between the API routes of the various applications. Feel free to fork this repo and extend it for use with Access. Not something I plan on doing. |
Beta Was this translation helpful? Give feedback.
Hmm, too bad there’s lack of consistency between the API routes of the various applications. Feel free to fork this repo and extend it for use with Access. Not something I plan on doing.