User Provisioning API Usage Struggles


I am attempting to manage our nextcloud users from a seperate PHP app. I wanted to test this provisioning API from the command line using curl. I attempted to following curl command but I get a status code 997. I understand this is possibly to do with the “admin” user in the command not being logged in or maybe how nextcloud handles CSF tokens.

Any tips on where to go to from here. I’m not all that advanced on this sort of integration but I will keep attempting to get it to work.

Thanks for any examples / advice.

# curl http://admin:password@ -H “OCS-APIRequest: true”


<?xml version="1.0"?> failure 997 Current user is not logged in

Attached XML response as editor removes the xml.

See attached.


@Col you found a solution? I try to write a nagios check for the serverinfo/api/v1/info