AnsweredAssumed Answered

esriId.registerToken is not a function

Question asked by kostaspapakon on Aug 17, 2017
Latest reply on Aug 17, 2017 by roemhildtg

Hello,

 

I try to register a token I have created, using IdentityManager.registerToken()

as it is suggested in MapImageLayer | API Reference | ArcGIS API for JavaScript 4.4 and

IdentityManager | API Reference | ArcGIS API for JavaScript 4.4 

but i get the error, in console , "esriId.registerToken is not a function". What's wrong?

thank you,
Kostas

...

var esriRequireModules = [
    "esri/Map",
    "esri/request",
    "esri/geometry/support/webMercatorUtils",
    "esri/geometry/Point",
    "esri/widgets/Search",
    "esri/Graphic",
    "esri/symbols/PictureMarkerSymbol",
    "esri/PopupTemplate",
    "esri/layers/GraphicsLayer",
    "esri/layers/FeatureLayer",
    "esri/layers/MapImageLayer",
    "esri/layers/GroupLayer",
    "dojo/on",
    "dojo/domReady!",
   "esri/identity/IdentityManager"
];

var esriRequireCallback = function(
    Map,
    esriRequest,
    webMercatorUtils,
    Point,
    Search,
    Graphic,
    PictureMarkerSymbol,
    PopupTemplate,
    GraphicsLayer,
    FeatureLayer,
    MapImageLayer,
    GroupLayer,
    on,
    esriId
) {

...

esriId.registerToken({
    server : ...
    token : ...
    expires : ...
});

...

};

esriLoader.require(esriRequireModules, esriRequireCallback);

 

Outcomes