Fix SharePoint 2013 NTLM POST Request 403 Forbidden Error
Question details
The user is encountering an HTTP 403 Forbidden error when attempting to create a new list item in SharePoint 2013 using a REST API POST request with libcurl and NTLM authentication.

- Product
- SharePoint 2013
- Device & OS
- not provided
- Scenario
- Creating a new SharePoint list item programmatically using an on-premises REST POST request with libcurl and NTLM authentication.
- Observed behavior
- GET requests authenticate and execute successfully, but POST requests fail with an HTTP 403 Forbidden response.
Ensure that your libcurl configuration is properly handling the multi-stage NTLM authentication handshake and that the user account executing the request has 'Contribute' permissions on the target SharePoint list.
Include a Request Digest Token in Headers
SharePoint REST APIs require a Form Digest token for any state-changing operations (POST, PUT, DELETE) to prevent Cross-Site Request Forgery (CSRF).
By design, SharePoint 2013 allows GET requests without a digest token because they only read data. However, POST requests modify the server state. You must first request a token from the server and include it in the headers of your subsequent POST request.
Send an empty POST request to the endpoint `http://<site_url>/_api/contextinfo` using your libcurl script, ensuring NTLM authentication is enabled.
Parse the response to find the token. If you request JSON format (`Accept: application/json;odata=verbose`), the token is located in `d.GetContextWebInformation.FormDigestValue`.
In your actual POST request to create the list item, add the custom HTTP header `X-RequestDigest: <token_value>`.

Verify IIS and Site Permissions
Incorrect IIS authentication settings or insufficient SharePoint site permissions can also trigger a 403 Forbidden error despite successful NTLM handshakes.
Enhance Your Document Workflow with WPS Office
If you are developing enterprise solutions or managing documents across teams, consider using WPS Office. It provides a lightweight, highly compatible, and cost-effective alternative to Microsoft Office, ensuring seamless productivity without heavy licensing fees.
- 1. Download the Installer: Visit the official WPS Office website and download the free installer for your operating system.
- 2. Install WPS Office: Run the setup file and follow the quick installation prompts to set up your workspace.
- 3. Open Office Documents Seamlessly: Instantly open, edit, and save your existing Microsoft Word, Excel, and PowerPoint files with perfect formatting retention.

Frequently Asked Questions
Why do GET requests work but POST requests return 403 Forbidden in SharePoint REST API?
GET requests only read data and do not modify the server state, so they do not require a request digest token. POST requests modify data, triggering SharePoint's Cross-Site Request Forgery (CSRF) protection, which strictly requires an X-RequestDigest header for validation.
How do I get the X-RequestDigest token in SharePoint 2013?
You can retrieve this token by making an empty POST request to `http://<site_url>/_api/contextinfo` with an `Accept: application/json;odata=verbose` header. The token will be returned in the `d.GetContextWebInformation.FormDigestValue` property of the response body.
How long is a SharePoint request digest token valid?
By default, a request digest token in SharePoint is valid for 30 minutes. If your automation script or application runs longer than this timeframe, you will need to programmatically request a fresh token to avoid encountering subsequent 403 Forbidden errors.




