I have created a connected app which my client will be using to create cases in Salesforce. On testing the connected app using Postman I was able to get the access token, and also responses for SOQL queries and case creation.
Now when I try to create a content version record, it works and I get Id of the record when I don't put in the OwnerId and the ContentLocation fields, I get a success response. But when I try the same with the OwnerId and ContentLocation fields the below is the error I receive -
If I put in OwnerId -
{
"message": "Documents in a user's private library must always be owned by that user.",
"errorCode": "INVALID_STATUS",
"fields": [
"OwnerId"
]
}
If I put in ContentLocation -
{
"message": "No such column 'ContentLocation' on sobject of type ContentVersion",
"errorCode": "INVALID_FIELD"
}
When I dont supply values for the above fields I get an error when I create a ContentDocumentLink record
{
"message": "You cannot create a link for a document in a private library: ContentDocument ID",
"errorCode": "FIELD_INTEGRITY_EXCEPTION",
"fields": [
"ContentDocumentId"
]
}