Ad Code

Responsive Advertisement

Ticker

6/recent/ticker-posts

Sharepoint 2013 via REST API: Error 403 Forbidden when trying to create item

Reference : https://stackoverflow.com/questions/32435432/sharepoint-2013-via-rest-api-error-403-forbidden-when-trying-to-create-item

When trying to send the data I get the 403 "Forbidden" error.

"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."
    }
}
Add the request digest form to the body. It should have the following structure:
<form runat="server">
   <SharePoint:FormDigest ID="FormDigest1" runat="server"></SharePoint:FormDigest>
</form>