Importing data into kobo via the REST api

Hello I’m trying to import data into kobo using the REST api but I keep getting an error.

What I want to do
We have data we’ve already collected on kobo but want to migrate it to a new form.

What I have tried
I have tried using the kobo REST api to achieve this using both the csv and JSON api endpoints. The documentation is found here: https://kc.kobotoolbox.org/api/v1/submissions. None of them worked, With the json, I get a missing CSRF token error while with the csv import I get you do not have permission to perform this action.

Welcome to the community, @yaaminu! Maybe you could do it as outlined in the post discussed previously (using python codes):