Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Lukag
1 year agoCollaborator | Level 8
Access dropbox file - Authentication failed because the remote party has closed the transport stream
i'm new in this type of access. I wrote this code but i have the error in objet to recover the list of files in dropbox. Dim token As String token = "sl.B6........." Dim _command As String _co...
Здравко
1 year agoLegendary | Level 20
The endpoint for folder listing is RPC call style endpoint. RPC on Dropbox uses POST request and it's mandatory 'path' to be passed in JSON style to the request body. Fix your code.
Good luck.
- Lukag1 year agoCollaborator | Level 8
Thank you.
It's first time that i use this tools.
I changed the Metod in POST and insered the path ( looking other example ) but i have always error 401 not autorized.
this is new cod :
Dim _command As String
_command = "https://api.dropboxapi.com/2/files/list_folder"Dim Request As HttpWebRequest
Request = HttpWebRequest.Create(_command)
Request.Method = "POST"
Request.KeepAlive = True
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 Or SecurityProtocolType.Tls12 Or SecurityProtocolType.Tls11 Or SecurityProtocolType.Tls
Request.ContentType = "application/json" ' application/x-www-form-urlencoded"
Request.UserAgent = "Mozilla/5.0 (Windows NT 6.3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36"
ServicePointManager.SecurityProtocol = CType(48, SecurityProtocolType) Or CType(192, SecurityProtocolType) Or CType(768, SecurityProtocolType) Or CType(3072, SecurityProtocolType)
Request.AllowAutoRedirect = TrueRequest.Headers.Add("Authorization", "Bearer " & token)
Dim payloadLiteral = "{""Path"": ""/files/list_folder""}"Dim payload = Encoding.UTF8.GetBytes(payloadLiteral)
Request.ContentLength = payload.LengthUsing dataStream = Request.GetRequestStream()
dataStream.Write(payload, 0, payload.Length)
End UsingTry
Using response = CType(Request.GetResponse(), HttpWebResponse)
Using reader = New IO.StreamReader(response.GetResponseStream())
'Return reader.ReadToEnd()
End Using
End Using
Catch ex As WebException
Using response = CType(ex.Response, HttpWebResponse)
Using reader = New IO.StreamReader(response.GetResponseStream())
Throw New Exception(reader.ReadToEnd())
End Using
End Using
Catch ex As Exception
Throw
End Try- Здравко1 year agoLegendary | Level 20
Are you sure the access token you're using is actual one and not expired? 🧐
Also, post the received result (either error or success) so it be clear what's going on exactly..
- Lukag1 year agoCollaborator | Level 8
I have generate a new token and insered in my web app.
Additional information: Error in call to API function "files/list_folder": request body: unknown field 'Path'
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!