Editing a report via the Kobo API endpoint by authentication with the API Key only seems to work as long as I am also logged in as a user to the KoboToolbox web environment.
Many other API endpoints are accessible with the API Key only, and that used to be the case with the edit endpoint too in the past.
Thank you @Kal_Lam for your continued support over the years!
But these related posts seem to deal with obtaining the url from the API, or with authenticating with the API, or with the format of the API request or with the duration of the validity of the API response.
In my case however I authenticate successfully with the API and I do receive a valid url back from the API and am able to automatically forward it to the browser within the time of validity.
My problem is that ONLY if I am also logged in to the web environment of Kobo, then the link that was returned from the API results in a correctly loading report that can be edited and succesfully re-submitted. But, if I am not logged in the web environment of Kobo, the link that was returned from the API in a browser shows the error from my message above.
Which is odd, since I already authenticated by API Key to obtain the edit url and also since my project is open to receive submissions without login.
To reproduce the issue, this little php script authenticates with the API in my project, gets the url to edit the report and forwards the url to the browser: https://entrack.org/test/edit_test.php