Gathering Information about Present Logged in user via API

Hello all,

After I logged in to Nextcloud as a user not an admin How to get that logged in user’s information through api is there any api is there ?.

Help me on this to get that api Like this " /api/v3//core/users/me/"

Not that I know of. So if it exists, then I just don’t know about it yet

Do I understand you correctly? So you want to be able to access this information as a normal user?

The only thing I can offer you is nc-who

nc-who accesses the database in which the online status is registered in real time.
There are also other parameters, such as audit log entries, where you can read when someone logs in, but this always requires access to the system console. So not for normal users.
However, if you can explain in more detail what exactly you want to achieve with the information, then it may be possible to accomplish this using onboard tools.

h.t.h.


Much and good luck,
ernolf

GET /ocs/v1.php/cloud/users/USERID

This request returns the available metadata of a user. Admin users can see the information of all users, while a default user only can access their own metadata.

https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-api-overview.html#user-metadata

2 Likes