I created an Android app (by Java) to connect to Nextcloud server. Both of them are virtual machines and in the same physical machine. For the connection, I used https://github.com/nextcloud/android-library.
For my APIs, I added annotation @NoCSRFRequired
and called them from the server successfully.
When I call them from terminal in Android Studio, I got the error Current user is not logged in
even I enter the same username and password. In some case, I have error CSRF check failed
. I tried to set the header OCS-APIRequest: true
in my Android app but nothing changes.