I was trying to get Users in the Custom UI by using this endpoint
Getting this error message: “OAuth 2.0 is not enabled for method: GET /rest/api/2/groupuserpicker%3Fquery”
I tried by Using the endpoint for fields
/rest/api/2/field & its working
Any help would be greatly appreciated!
It’s the encoding of your URL string which is causing the error.
See the same question I asked.
Thank you replying, Unable to view the page
When passing a string to the
route function, the string is escaped. The
url string you pass contains the
? to define the query strings parameters and that is the escape of this character causing the OAuth error.
You must use the
route tagged template function to construct the path that’s passed to the product fetch APIs.
route is a tagged template function that runs
encodeURIComponent on each interpolated parameter in the template string. This provides protection against security vulnerabilities, such as path traversal and query string injection.
You should pass the query string and use a fixed based URL in your backend function.
Since your backend function is
GET_GROUP_USER_PICKER, having a fixed base URL should not be an issue.
Thank you @FabienLydoire
It worked now able to get the Users!