Request A File (Shares/Request) returns 404 Not Found

  • 1
  • Question
  • Updated 3 months ago
Code that was working correctly now returns a '404 Not Found' error.  The following code are snippets of what we have been using for some time but now returns an error.  Has something changed in the API?  

  'note below that params.Emails is defined as List(Of String)

  Dim shareRequestParams As New Dictionary(Of String, Object)
  shareRequestParams.Add("FolderId", params.FolderId)
  shareRequestParams.Add("FolderPath", params.FolderPath)
  shareRequestParams.Add("Emails", params.Emails)
  shareRequestParams.Add("Subject", params.Subject)
  shareRequestParams.Add("Body", params.Body)
  shareRequestParams.Add("NotifyOnUpload", params.NotifyOnUpload)
  shareRequestParams.Add("CcSender", params.CcSender)


  uri = String.Format("https://{0}/sf/v3/Shares/Request", GetHostname(currentSharefileToken))

  Dim request As HttpWebRequest = WebRequest.Create(uri)
  AddAuthenticationHeader(request, currentSharefileToken)

  request.Method = "POST"
  request.ContentType = "application/json"

  Dim json As String = JsonConvert.SerializeObject(shareRequestParams)

  Using writer As New StreamWriter(request.GetRequestStream())
        writer.Write(json)
  End Using

  Dim response As HttpWebResponse = request.GetResponse()
Photo of James

James

  • 17 Posts
  • 1 Reply Like

Posted 3 months ago

  • 1

Be the first to post a reply!