Create a Client Settings JSON to be able to create an ODK Collect QR code to access a specific DRAFT FORM not the PROJECT's published forms

1. What is the issue? Please be detailed.

  • I am developing a form builder for my employer's web application. Now everything is going well regarding the construction of the Xml form, this is created in the user UI and sent to ODK Central via the API.
  • I can show the user a preview of the XML form draft using Enketo, it works fine.
  • To give access to the project, the user with the role of project administrator is automatically created with the email and password of the user who is authenticated in our Web App.
  • To give access to the draft of the XML form, the app-user is also created with our Web App and assigned to the corresponding project. Once the users are created in ODK Central, the user of our Web App has the role of project administrator in ODK Central and has an app-user with his name to be able to access the web preview with Enketo and the view preview on ODK Collect mobile.
  • With the help of a library, I can transform the JSON with the "client settings" into the encoded string to create the QR code and display it in our Web App.

Current challenge:

  • I can give the user the ability to PREVIEW the draft XML form on the Web with Enketo but I can't do it in the ODK Collect Android App by scanning the QR code that our Web App shows the user.
    In ODK Central, I select the project from the project list, immediately I can see the list of forms of that project, if I select a form in draft a new view shows information of that draft, on the right side of that view there are two tabs "Status " and "Testing" automatically generates a QR code that can be scanned with ODK Collect and in the mobile app a temporary project is created with the same name as the title of the form, and by clicking on "Fill Blank Form" the draft of the form is displayed in the list.
  • The QR code that is shown to the user in our Web App, by scanning it, you can create the temporary project with the same name as the form title, but by clicking on "Fill Blank Form" there is no form in the list.
  • I manually decoded the QR code that ODK Central generates and realized that it generates a different app-user TOKEN for each draft form in the project, which suggests to me that the app-user TOKEN that our Web App gets from the API does not have access to these drafts through ODK Collect.
  • I can't find anything in the API documentation to guide me in resolving this situation.

So what can I do?

2. What steps can we take to reproduce this issue?

  • Go to ODK Central, create a project, create a basic "client settings" JSON string with the necessary data, create the QR code and scan it with ODK Collect.
  • Our Web App user has the same email and display name in ODK Collect and logs in to ODK Collect with the API automatically, and that user is a project manager ( in ODK Central ) for that specific project, additionally an app-user is created with the same display name as the project manager to be able to get an app-user token to be able to create the token.

3. What have you tried to fix the issue?
Well I guess I already did that, but if more info is required let me know

4. Upload any forms or screenshots you can share publicly below.