@kbitra1998,It seems like the permission issue for the anonymous user publish, So handle it you should be having one system user and provide the permission to the node.It should work as expected.https://experiencemanaged.com/posts/send-a-csrf-token-to-an-aem-61-servlet-without-using-jquery-or-granit...