citrix / ShareFile-NET

C# library for accessing ShareFile V3 API
MIT License
36 stars 26 forks source link

Sharefile create share Code works in postman, but not in vb #33

Closed LeeDress closed 4 years ago

LeeDress commented 4 years ago

I'm trying to do "Create a share" I'm using https://mydomain.sf-api.com/sf/v3/shares?notify=false (spoofed of course for this message) in postman I add this to the body {"ShareType": "Send", "Items": [{"Id": "myID"}], "RequireLogin": false,"RequireUserInfo": true, "MaxDownloads": -1,}
I get a link in response text.

in my code I run this:
sharemodel = {"ShareType": "Send", "Items": [{"Id": "myID"}], "RequireLogin": false,"RequireUserInfo": true, "MaxDownloads": -1,} ' newurl = "https://mydomain.sf-api.com/sf/v3/shares?notify=false" Set httpobj2 = CreateObject("MSXML2.ServerXMLHTTP.6.0") httpobj2.open "POST", url httpobj2.SetRequestHeader "Authorization" , "Bearer " & AccessToken httpobj2.setRequestHeader "Content-Type", "application/json" httpobj2.send(Sharemodel)

I get a response 405 Requested resource does not support 'POST'

LeeDress commented 4 years ago

I sent the wrong url. my bad...I noticed as soon as I posted this