"{"error": { "code": 498, "message": "Invalid token."}

1316
1
Jump to solution
01-02-2022 07:31 AM
naveenbesri
Occasional Contributor

Hi All,

When i try to get arcgis portal users with below rest url in the code level. Im getting below error

function _verifyUserRole(username, token) { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = () =>{ if(xhttp.readyState == XMLHttpRequest.DONE) { var jsonResponse = JSON.parse(xhttp.responseText); } }; xhttp.open("GET", "https://domainname/portal/sharing/rest/portals/0123456789ABCDEF/users?username="+username+"&f=pjson&referer=https://domainname&token=" + token, true);
xhttp.send(); }
 

"{"error": { "code": 498, "message": "Invalid token.", "details": [] }}"

But when i try to access the same url in the browser im getting response. 

 

Could you please help me on this. 

Thanks.

1 Solution

Accepted Solutions
ABishop
MVP Regular Contributor

Not sure about why you are receiving this error, but I looked up the error code and I got this thread:

https://community.esri.com/t5/arcgis-api-for-python-questions/error-code-498-message-invalid-token/t... 

Amanda Bishop, GISP

View solution in original post

1 Reply
ABishop
MVP Regular Contributor

Not sure about why you are receiving this error, but I looked up the error code and I got this thread:

https://community.esri.com/t5/arcgis-api-for-python-questions/error-code-498-message-invalid-token/t... 

Amanda Bishop, GISP