Nintex Observer

How to create a site using web request in 365

I'm trying to create a sub site using the web request action as the 365 create site action is not available in our action pack. I have the web request action configured to:

URL call: <site url>/_api/web/webinfos/add

Method: POST

Content-type: application/json;odata=verbose

Accept: application/json;odata=verbose

Origin: 0

Body (Content): {"parameters": {"__metadata": {"type": "SP.WebInfoCreationInformation"},"Url": "choc","Title":"Chocolate","Description": "Example","Language": 1033,"WebTemplate": "PROJECTSITE#0","UseUniquePermissions": true}}

Instead of getting the request digest, I have provided the user name and password of a SharePoint admin, so an authenticated header will be created regardless of who triggers the workflow. The response code I'm getting is:

{"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."}}}

Does anyone have any ideas on how to resolve this issue? Is there something hugely obvious I'm missing?

Any help greatly appreciated.

0 Kudos
1 Reply
Automation Master
Automation Master

Re: How to create a site using web request in 365

Katherine please follow the advises I wrote you in your identical post:  

I need to close this one as this is a duplicate.



0 Kudos