So I am trying to check out a document in Sharepoint 2013 via the REST API.
I am hitting the following endpoint:
http://win-5a8pp4v402g/sharepoint_test/site_1/_api/web/GetFileByServerRelativeUrl('/sharepoint_test/site_1/Documents/file1.txt')/checkout
However in the response I get this:
{"error":{"code":"-2130575251, Microsoft.SharePoint.SPException","message":{"lang":"en-US","value":"The security validation for this page is invalid and might be corrupted. Please use your web browser's Back button to try your operation again."}}}
However when I am manually checking out the same document in the browser, it works pretty well.
I looked here for a solution, but it doesnt apply in the case of check out via REST API.
Please help.