I created a custom app for data capture. I had followed the same step like I did with other data capture apps I created which are working fine.
When I login as admin and submit data, it is successful. But when I login with the user account that has the same role like other users of the app, I get the error
I think I have find the cause of the issue. It is related to the manual user account setting I use to test the app. I forget to comment out the token account.
It looks like you are receiving an error with a status of “Unauthorized” and an HTTP status code of 401. This generally means that the request you are making requires some form of authentication, and you have not provided the necessary credentials. The server is rejecting the request because it is not authorized.
The specific cause of the error could be related to a number of factors, including but not limited to:
Missing or invalid authentication tokens
Insufficient permissions to access the requested resource
To fix this error, you will need to ensure that you are providing the correct authentication credentials and/or have the necessary permissions to access the resource you are requesting. If you are unsure about what is causing the error, you may want to check with the server administrator or the documentation for the App you are using or maybe share settings for the data set.
Thanks and you are right. However earlier questions asked by @Caroline gave me a clue and I was able to detect the cause. I had hard coded a username, password and token for the custom app and forget to comment it out in the live version.