Unable to POST XLS form file to new KoBo API

Hi all,

I am trying to achieve the following tasks using R and new KoBo API (https://kobo.humanitarianresponse.info).

#1) upload XLS form to new KoBo API (KPI)

#2) deploy form/asset

#3) copy/clone project and change properties such as form/project name etc

#4) share the deployed form to other users

My library of codes can be found in https://github.com/ppsapkota/kobohr_apitoolbox. The issue I am facing is mainly to upload xlsform file using new KoBo API file. I am using POST method with url https://kobo.humanitarianresponse.info/imports/ as suggested by the KoBo team. The code is in https://github.com/ppsapkota/kobohr_apitoolbox/blob/master/R/r_ps_kobo_api_xlsform_upload_kpi.R

When I run the code, I get ‘server 500’ error. I tested with another POSTing method to check whether it is an authentication error or not. The asset deployment method is working (https://github.com/ppsapkota/kobohr_apitoolbox/blob/master/R/r_ps_kobo_api_assets_manage_kpi.R) even though it sends the project to Archive rather than in the deployed project list.

I also tried to check using Postman but get the same server error (screenshot attached. Any idea what I am missing here?

Best regards,

Punya Sapkota