Cant Get Items(allshared)

  • 1
  • Problem
  • Updated 2 months ago
Hi i am using Delphi to acces the sharefile api. After alot of research i cant find the problem with accessing the shared folders you should get with "/sf/v3/Items(allshared)" . I have no problem listing and accesing the home folder with " /sf/v3/Items".
The call ends with a "400 Bad Request", and "'{"Message":"The request is invalid."}'" as content from the request.
if i try to use the folder id itself, it is the same.
If i log in to the website i can access the folders and upload and download files.
As well i put in the "Authorization Bearer" token in the request like i did with the home folder.

Does anyone has an idea what the actual problem is?



Photo of TobiS

TobiS

  • 2 Posts
  • 0 Reply Likes

Posted 2 months ago

  • 1
Photo of Nick Nicholls

Nick Nicholls, Employee

  • 21 Posts
  • 2 Reply Likes
What you have looks correct. If you have fiddler or some other network tracing tool, it might be helpful if we could get the actual request and response.

A successful one should look like:
GET https://<subdomain>.sharefile.com/sf/v3/Items(allshared) HTTP/1.1
Cookie: SFAPI_AuthID=<authid>
Accept: application/json
Accept-Encoding: gzip, deflate
Host: <subdomain.sharefile.com>

Can you also try "/sf/v3/Items(top)" and "/sf/v3/Items(favorites)" and see if you get the same response?

Thanks,
Nick
Photo of TobiS

TobiS

  • 2 Posts
  • 0 Reply Likes
Hi as far as i can see it all looks correct. Also i tried it with "top" and "favorites". I get the same errormessage. I also tried it with an ID that exists but its still the same. I have no idea where the problem is.
Photo of Nick Nicholls

Nick Nicholls, Employee

  • 21 Posts
  • 2 Reply Likes
hmm, if you have some network tracing tool (we usually use fiddler), can you capture the request/response and send it to us? Both the successful and failing requests.

If you have Postman, you can try recreating the requests with that. I'm guessing is something with Delphi.

Thanks,
Nick