Share file over API. Status:100 but no share created

hi there,
i create a file using php and afterwards want to share this file via owncloud (using the same php file)
it seems, the easiest way would be via a https request https://doc.owncloud.org/server/10.0/developer_manual/core/ocs-share-api.html#response-attributes-1 although it feel a bit weird to use an admin account just to share a user file.

i use this URL: (using a webbrowser)
https://user:pass@cloud.blox.media/ocs/v1.php/apps/files_sharing/api/v1/shares?name=12345&path=/Nieren.pdf&shareType=3&publicUpload=false&expireDate=2019-02-28

it returns
<?xml version=“1.0”?> <ocs> <meta> <status>ok</status> <statuscode>100</statuscode> <message/> </meta> <data/> </ocs>

but no share is beeing created. my questions:

  • what may i did wrong? Did not really find example code in the docs
  • do i really need an admin account?
  • what means “status:OK”? “the share was created” or just that “the syntax was correct”?
  • And is this the expected behavior or rather a bug? (OK/Status/100, but no share created)
  • how to send a mail notification? mail_send is only a Response Attribute but cannot be set?

Another thing:
also i have another OC9 instance running under 2 Domains: https://cloud.domain1.tld and https://cloud.domain2.tld
even though domain1.tld is the MAIN domain set in config.php AND /etc/apache/sites/enabled/owncloud-ssl.config
the API call works ONLY on Domain2 and ends up in a redirect when using the same call on Domain1. 8wich then prompt for user:pass again and will never actually answer the API call.
This is really weird and i wonder if there is another location to set the main domain…

That’s wrong, you don’t have to.

BTW, move the 2nd topic into a separate thread, as its completely unrelated with your sharing issue.