When I try do share via share API as mentioned above with curl I always get a
{"message":"CSRF check failed"}
The command I used was
curl -u "myuser:mypassword" -X POST https://nextcloud/ocs/v1.php/apps/files_sharing/api/v1/shares -d path="globalshare/0002/pic.jpg" -d shareType=3 -d permissions=1 -d expireDate="2017-07-20"
Any Ideas?