0

I have created a HTML page which contains a feature layer that is published in the ArcGIS Online. The feature layer is shared with organization. When I run the page it is asking for the username and password, and whenever I enter the credentials it shows the username or password you entered is incorrect, but I know my username and password is absolutely correct.

When I checked in network, in generateToken file it gives error like: message: "Unable to generate token." details: ["'referer' must be specified."]

And when I tried the same code in ArcGIS Online sandbox it worked fine.

8
  • The message is not about user name or password, it is about HTTP referer field en.wikipedia.org/wiki/HTTP_referer. Edit your code and add the missing header. – user30184 Mar 7 '20 at 21:42
  • Which version of the ArcGIS API for JavaScript are you using in your HTML page? – Bjorn Svensson Mar 8 '20 at 16:36
  • Hi @BjornSvensson sorry for the late reply. I am using 3.31 version of ArcGIS API. – Shalinee Mishra Mar 16 '20 at 5:55
  • @user30184 sorry for late reply. Could you please tell me what to add in header or if you give me some example, i am new to ArcGIS API. – Shalinee Mishra Mar 16 '20 at 5:58
  • 1
    I am not familiar with the API but perhaps the documentation helps developers.arcgis.com/rest/users-groups-and-items/… – user30184 Mar 16 '20 at 9:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.