Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting a 403 message when trying to create a new list item #63

Closed
GarrickVCertarus opened this issue Mar 15, 2022 · 2 comments
Closed

Comments

@GarrickVCertarus
Copy link

I have an integration using Sharepy that suddenly stopped working about 2 weeks ago (the last commit was 9 months ago).

Post requests to create new SharePoint list items do not appear to be working anymore, the request below:

sharepy.post("https://xxxxxxxxx.sharepoint.com/sites/xxxSite/_api/web/lists/getByTitle('Test List')/items", data)

gives the following forbidden error:

'{"error":{"code":"-2130575251, System.Runtime.InteropServices.COMException","message":{"lang":"en-US","value":"The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again."}}}'

I assumed that this might have something to do with the request digest since Get requests are not broken, but it appears the Sharepy object does contain the digest.

@JonathanHolvey
Copy link
Owner

There is an issue in SharePy v2 that prevents POST requests from being authenticated properly. Until this is fixed, I recommend using the previous release, which is v1.3.0. See #49 and #59

@GarrickVCertarus
Copy link
Author

Thanks for the response, I have ensured that it uses v1.3.0, and everything is back up and running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants