error 404 - not_found for client.CollaborationsManager.GetCollaborationAsync
hello,
I have .net application that needs to get the collaborators for a file. Working with SDK APIs and hence using the BoxClient. the API I am using to get the collaborators is client.CollaborationsManager.GetCollaborationAsync. However I am getting the error 404. I checked the ID passed to the method do exist. here is the complete Error returned.
"{\"type\":\"error\",\"status\":404,\"code\":\"not_found\",\"context_info\":{\"errors\":[{\"reason\":\"invalid_parameter\",\"name\":\"collab\",\"message\":\"Invalid value '699430145416'. 'collab' with value '699430145416' not found\"}]},\"help_url\":\"http:\\/\\/developers.box.com\\/docs\\/#errors\",\"message\":\"Not Found\",\"request_id\":\"huc997ghmx5v0aei\"}".
I checked from the API reference where we can "Try the API" on the website. Even there too I get the same error.
{ "type": "error", "status": 404, "code": "not_found", "context_info": { "errors": [ { "reason": "invalid_parameter", "name": "collab", "message": "Invalid value '1***phone number removed for privacy***'. 'collab' with value '1***phone number removed for privacy***' not found" } ] }, "help_url": "http://developers.box.com/docs/#errors", "message": "Not Found", "request_id": "aqebnkghmz1dufhh" }
I have two Apps in my box account and I tried creating the boxclient with both clientid&secretid but did not help.
Any help will be greatly appreciated.
Thanks
-
Hi , I presume you are trying to pass the file/folder id rather than the collaboration id which is expected by the endpoint. You would first need to get the collaboration id by calling the get file collaborators or get folder collaborators endpoints and then pass the appropriate collaboration id to the Get collaboration endpoint.
Regards,
Nayak
-
Agreed with that assessment. A 404 generally means the resource with that ID does not exist, or the currently authenticated user does not have access to that resource. I assume you have access to the file you're trying to get the collaborators for? If so, then the ID is probably wrong.
You can use this API to get the collabs for a file.
https://developer.box.com/reference/get-files-id-collaborations/
サインインしてコメントを残してください。
コメント
2件のコメント