I am using SharePoint 2013 rest api. I want to share SharePoint document among multiple users Here is my rest endpoint
https://XXXXXX.sharepoint.com/sites/XXXX-Test-SharePoint/_api/web/Lists(%27%7BB17B74B2-6EB4-4D3E-9DD6-4CCD0202C30D%7D%27)/GetItemById(90)/ShareObject
and passing POST data to endpoint as below
{"peoplePickerInput":[{"Key":"i:0#.f|membership|[email protected]","Description":"[email protected]","DisplayText":"John Miller ","EntityType":"User","ProviderDisplayName":"Tenant","ProviderName":"Tenant","IsResolved":true,"EntityData":{"IsAltSecIdPresent":false,"Title":"Partner","Email":"[email protected]","MobilePhone":0,"ObjectId":"c8dd8ac6-fb06-4d59-94e0-6e525b98146d","Department":"Professional Services Americas"},"MultipleMatches":[]},{"Key":"i:0#.f|membership|[email protected]","Description":"[email protected]","DisplayText":"david Miller ","EntityType":"User","ProviderDisplayName":"Tenant","ProviderName":"Tenant","IsResolved":true,"EntityData":{"IsAltSecIdPresent":false,"Title":"Partner","Email":"[email protected]","MobilePhone":0,"ObjectId":"c8dd8ac6-fb06-4d59-94e0-6e525b98146d","Department":"Professional Services Americas"},"MultipleMatches":[]}],"propagateAcl":true,"roleValue":"role:1073741827","sendEmail":true,"useSimplifiedRoles":true,"emailSubject":"Sharing Test","emailBody":"Shared you folder..","includeAnonymousLinkInEmail":false}
After executing above url, i am getting below response
{"odata.error":{"code":"-1, Microsoft.Data.OData.ODataException","message":{"lang":"en-US","value":"A node of type 'StartArray' was read from the JSON reader when trying to read a value of a property; however, a 'PrimitiveValue' or 'StartObject' node was expected."}}}