Campbell Burgess Posted December 17, 2023 Share Posted December 17, 2023 https://api.sharefile.com/docs/resource?name=Shares doscuments the POST data as: { "ShareType": "Send", "Title": "Sample Send Share", "Items": [ { "Id": "FILE ID" } ], "ExpirationDate": "2023-12-18", "RequireLogin": false, "RequireUserInfo": false, "MaxDownloads": -1, "UsesStreamIDs": false } I get a server 400 (BAD REQUEST) .... or {"code":"BadRequest","message":{"lang":"en-US","value":"Invalid Share: provide either a type, parent, or item list"},"reason":"BadRequest"} when I send that data. What's up? Link to comment
0 Kevin Glenn Posted December 18, 2023 Share Posted December 18, 2023 Hi Campbell, I just tested the request with the payload provided (replacing "FIlE ID" with an actual File ID) and it successfully returned a share ID as expected. Are you plugging in a valid File ID on this line? (Does the GUID start with "f"?) "Id": "FILE ID" Here's a screenshot of my successful request: If that doesn't help, I would suggest opening a support case and providing a screen capture of your exact request in Postman or a capture of the network traffic with HTTPS decryption using a proxy service like Fiddler. Link to comment
Question
Campbell Burgess
https://api.sharefile.com/docs/resource?name=Shares doscuments the POST data as:
{
"ShareType": "Send",
"Title": "Sample Send Share",
"Items":
[
{
"Id": "FILE ID"
}
],
"ExpirationDate": "2023-12-18",
"RequireLogin": false,
"RequireUserInfo": false,
"MaxDownloads": -1,
"UsesStreamIDs": false
}
I get a server 400 (BAD REQUEST) .... or {"code":"BadRequest","message":{"lang":"en-US","value":"Invalid Share: provide either a type, parent, or item list"},"reason":"BadRequest"}
when I send that data.
What's up?
Link to comment
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now