How to pass API Token when editing a submitted instance

Hi all,

By using the URL /v2/assets/${formId}/data/${answerId}/enketo/edit, I’m able to edit a kobo submission but only if I’m previously connected (meaning that the cookie kobonaut__eu_kobotoolbox_org is set).

Is it possible to make this request work without being previously connected? For example by sending the API token in the header?

Thanks a lot in advance for your support.

@alexandreannic, maybe this post discussed previously should help you solve your issue:

Hello Kal,

Thanks a lot for your answer.

I realize my post was not clear enough. What I’m trying to do is to open the classic Enketo page that we have when we click on the edit button of the data tab in Kobo.

This page can only be opened if we are already log-in Kobo (meaning that the cookie kobonaut__eu_kobotoolbox_org is set).

The need is, from our own Web application, open this link without being previously connected. So I need to find a way to get a ‘kobonaut__eu_kobotoolbox_org’ from an API Token or Login/Password that I can set in cookies to reproduce the same behavior.

I tried to get this cookie using the POST https://eu.kobotoolbox.org/accounts/login/ request but I didn’t succeeded for now.

I realize that it’s a complicated question.