<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I add a secured feature service using a token in 4.X? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1115530#M75228</link>
    <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I needed also to change in the security option the support for two options:&lt;/P&gt;&lt;P&gt;"allowHttpPostQueryParams"&lt;/P&gt;&lt;P&gt;"allowHttpGet"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;under arcgis server admin -- &amp;gt; security --&amp;gt; tokens&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Nov 2021 07:05:51 GMT</pubDate>
    <dc:creator>ShmuelKatorzaDAO</dc:creator>
    <dc:date>2021-11-10T07:05:51Z</dc:date>
    <item>
      <title>How do I add a secured feature service using a token in 4.X?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1040881#M72219</link>
      <description>&lt;P&gt;I need to load a secured layer using an Esri token. In 3.X I did this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const url = `${serviceUrl}?token=${esriToken}&amp;amp;f=json`
var featureLayer = new FeatureLayer({
  url: url
});&lt;/LI-CODE&gt;&lt;P&gt;It worked great and would load the secure feature service.&lt;/P&gt;&lt;P&gt;I do the exact same thing in 4.X, and I get the pop-up asking me to sign in. I double-checked the URL, and it provides the JSON, so that's not the issue.&lt;/P&gt;&lt;P&gt;What gives? I already signed in using OAuth2. That's how I got the token. I don't want to have to sign in again. Please help. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 23:15:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1040881#M72219</guid>
      <dc:creator>MattStayner</dc:creator>
      <dc:date>2021-03-25T23:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a secured feature service using a token in 4.X?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1041075#M72231</link>
      <description>&lt;P&gt;There are a couple of options, but if you simply want to append it to the URL, you can use the before() requestInterceptor&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 15:24:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1041075#M72231</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-03-26T15:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a secured feature service using a token in 4.X?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1041121#M72233</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for the quick response? Yes, I just want to append the token to the URL. Why do I need to use a `requstInterceptor`. Why can't I just append the token to the request as shown in &lt;A href="https://codepen.io/mstayner/pen/jOyqyPG" target="_self"&gt;this example&lt;/A&gt;? I didn't include the actual token, but you get the idea.&lt;/P&gt;&lt;P&gt;At any rate, that approach doesn't work. I tried looking at before() and I can't wrap my mind around how I would do that. Would you mind updating the example to show how that would work?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 18:03:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1041121#M72233</guid>
      <dc:creator>MattStayner</dc:creator>
      <dc:date>2021-03-26T18:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a secured feature service using a token in 4.X?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1041198#M72237</link>
      <description>&lt;P&gt;We strip any URL parameters added to a layer URL to better manage params we need to use for queries and stuff. This is by design. The preferred way is IdentityManager for tokens, but you can use the requestInterceptors for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;      esriConfig.request.interceptors.push({
        // set the `urls` property to the URL of the FeatureLayer so that this
        // interceptor only applies to requests made to the FeatureLayer URL
        urls: "https://services6.arcgis.com/ExtdhXSbhHKK7FFW/arcgis/rest/services/Related_Table_2/FeatureServer/0",
        // use the BeforeInterceptorCallback to add token to query
        before: function(params) {
          params.requestOptions.query = params.requestOptions.query || {};
          params.requestOptions.query.token = "my-token";
        },
      });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can double check that its appended by checking the network request.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ReneRubalcava_0-1616788367716.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/9493i25C9BDA83030F0B7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ReneRubalcava_0-1616788367716.png" alt="ReneRubalcava_0-1616788367716.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 19:53:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1041198#M72237</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-03-26T19:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a secured feature service using a token in 4.X?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1042284#M72294</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;&amp;nbsp;Thanks for the reply. I used the same code as provide by you and replace the following:-&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;URL-&amp;nbsp;&lt;A href="https://services.slip.wa.gov.au/arcgis/rest/services/Landgate_v2_Subscription_Services/Cadastral/MapServer/35" target="_blank" rel="noopener"&gt;https://services.slip.wa.gov.au/arcgis/rest/services/Landgate_v2_Subscription_Services/Cadastral/MapServer/35&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Token- Generate Token from&amp;nbsp;&lt;A href="https://token.slip.wa.gov.au/arcgis/tokens/" target="_blank" rel="noopener"&gt;https://token.slip.wa.gov.au/arcgis/tokens/&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Now, my code looks like following:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const featureLayerUrl = "https://services.slip.wa.gov.au/arcgis/rest/services/Landgate_v2_Subscription_Services/Cadastral/MapServer/35";

esriConfig.request.interceptors.push({
urls: featureLayerUrl,
before: function (params) {
params.requestOptions.query = params.requestOptions.query || {};
params.requestOptions.query.token = "nXKRnEHxxxxxxxxxxxxxxxXXXXxxxxxxxxxxxxxxx.";
},
});

const cadastreLayer = new FeatureLayer({
url: featureLayerUrl,
outfields: ["land_id"]
});

map.add(cadastreLayer);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, it is still asking for the Username / Password on the page. Do you know what I'm missing? Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 04:57:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1042284#M72294</guid>
      <dc:creator>ZohaibUddinKhan</dc:creator>
      <dc:date>2021-03-31T04:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a secured feature service using a token in 4.X?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1042429#M72306</link>
      <description>&lt;P&gt;There is probably a request being made to the root of the service to check for capabilities. You can make the request interceptor url to the root of the server.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  urls: "https://services.slip.wa.gov.au"
}&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 31 Mar 2021 15:30:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1042429#M72306</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-03-31T15:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a secured feature service using a token in 4.X?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1042459#M72307</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;You can do couple of things. If you are using JS API version 4.18, then you can take advantage of &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#customParameters" target="_self"&gt;FeatureLayer.customParameters&lt;/A&gt; property as it was introduced for cases like this one. You can do this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var layer = new FeatureLayer({
  url: serviceUrl,
  customParameters: {
   "token": yourToken
  }
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are using a version older than 4.18, then you can use &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request" target="_self"&gt;interceptors&lt;/A&gt; to modify the request before it is sent. You can do this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt; const interceptor = {
    urls: [
    "url to the service",
  ],
  before({ url, requestOptions }) {
    requestOptions.query.token = "yourTOKEN";
  },
  after({ data, url, requestOptions }) {
    console.log("after", data, url, requestOptions);
  }
};
esriConfig.request.interceptors.push(interceptor);

const layer = new FeatureLayer({
  url: "service url"
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;-Undral&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 16:05:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1042459#M72307</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2021-03-31T16:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a secured feature service using a token in 4.X?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1042485#M72309</link>
      <description>&lt;P&gt;This worked perfectly for me. Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;&amp;nbsp;!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 16:56:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1042485#M72309</guid>
      <dc:creator>MattStayner</dc:creator>
      <dc:date>2021-03-31T16:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a secured feature service using a token in 4.X?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1042760#M72319</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/53756"&gt;@UndralBatsukh&lt;/a&gt;&amp;nbsp;for the reply. We're using&amp;nbsp;&lt;SPAN&gt;JS API version 4.18 and unfortunately it is still asking for the credentials. Am I doing something terribly wrong here ?&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Following is our code:-&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset="utf-8" /&amp;gt;
    &amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" /&amp;gt;
    &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
    &amp;lt;style&amp;gt;
        html,
        body,
        #viewDiv {
            padding: 0;
            margin: 0;
            height: 100%;
            width: 100%;
        }
    &amp;lt;/style&amp;gt;
    &amp;lt;link rel="stylesheet" href="https://js.arcgis.com/4.18/esri/themes/light/main.css"&amp;gt;
    &amp;lt;script src="https://js.arcgis.com/4.18/"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script&amp;gt;
        require(["esri/config", "esri/Map", "esri/views/MapView", "esri/layers/FeatureLayer"], function (esriConfig, Map, MapView, FeatureLayer) {

            esriConfig.apiKey = "AAPK9c1060b46848481f85233a3e75........-......._hEZz";

            const map = new Map({
                basemap: "arcgis-topographic" // Basemap layer service
            });

            const view = new MapView({
                map: map,
                center: [115.860299, -31.954594], // Longitude, latitude
                zoom: 13, // Zoom level
                container: "viewDiv" // Div element
            });

            const featureLayerUrl = "https://services.slip.wa.gov.au/arcgis/rest/services/Landgate_v2_Subscription_Services/Cadastral/MapServer/41";
            //const featureLayerUrl = "https://token.slip.wa.gov.au/arcgis/rest/services/Landgate_v2_Subscription_Services/Cadastral/MapServer/41";

            var layer = new FeatureLayer({
                url: featureLayerUrl,                
                customParameters: {
                    "token": "nXKRnEHxOLrfCyVAs3......_....."//Get the token from https://token.slip.wa.gov.au/arcgis/tokens/
                }
            });

            map.add(layer);
        });
    &amp;lt;/script&amp;gt;    
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;and following are the results while browsing:-&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="4-18.JPG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/9824i853ABA67556EDC62/image-size/large?v=v2&amp;amp;px=999" role="button" title="4-18.JPG" alt="4-18.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 07:37:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1042760#M72319</guid>
      <dc:creator>ZohaibUddinKhan</dc:creator>
      <dc:date>2021-04-01T07:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a secured feature service using a token in 4.X?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1042777#M72321</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/53756"&gt;@UndralBatsukh&lt;/a&gt;&amp;nbsp;, thanks for the reply. I've created a separate post so that we can track the solution and mark it accepted later.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the Post&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-api-for-javascript/how-to-access-secured-arcgis-server-map-service/m-p/1042775" target="_blank"&gt;https://community.esri.com/t5/arcgis-api-for-javascript/how-to-access-secured-arcgis-server-map-service/m-p/1042775&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 08:20:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1042777#M72321</guid>
      <dc:creator>ZohaibUddinKhan</dc:creator>
      <dc:date>2021-04-01T08:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a secured feature service using a token in 4.X?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1042778#M72322</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;&amp;nbsp;for the reply. I tried the change but no luck! Any clue what I'm doing wrong? I've created a separate post so that we can keep track and accept the solution later. (New post url:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-api-for-javascript/how-to-access-secured-arcgis-server-map-service/m-p/1042775" target="_blank"&gt;https://community.esri.com/t5/arcgis-api-for-javascript/how-to-access-secured-arcgis-server-map-service/m-p/1042775&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;Following is my code for JS API v4.16:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;&amp;lt;script type="text/javascript"&amp;gt;
        require([
            "esri/config",
            "esri/Basemap",
            "esri/Map",
            "esri/views/MapView",
            "esri/layers/VectorTileLayer",
            "esri/layers/FeatureLayer",
            "dojo/domReady!"
        ], function (esriConfig, Basemap, Map, MapView, VectorTileLayer, FeatureLayer
        ) {
            var initialLatitude = '-31.954594';
            var initialLongitude = '115.860299';
            var initialPoint = { type: "point", latitude: initialLatitude, longitude: initialLongitude };
            var vectorTileLayerID = '07a6b122323b4exxxxxxxc0a97b29';

            var wp_VectorTileLayer = new VectorTileLayer({
                portalItem: {
                    id: vectorTileLayerID
                }
            });

            var MDSbaseMap = new Basemap({
                baseLayers: [
                    wp_VectorTileLayer
                ]
            });

            var map = new Map({
                basemap: MDSbaseMap
            });

            var view = new MapView({
                container: "viewDiv",
                map: map,
                zoom: 11,
                constraints: {
                    minScale: 3000,  
                    maxScale: 30,  
                    rotationEnabled: false
                },
                center: initialPoint
            });

            view.popup.autoOpenEnabled = false;

            const featureLayerUrl = "https://services.slip.wa.gov.au/arcgis/rest/services/Landgate_v2_Subscription_Services/Cadastral/MapServer/41";
            //const featureLayerUrl = "https://token.slip.wa.gov.au/arcgis/rest/services/Landgate_v2_Subscription_Services/Cadastral/MapServer/41";

                esriConfig.request.interceptors.push({
                    urls: "https://services.slip.wa.gov.au/",
                    before: function (params) {
                        params.requestOptions.query = params.requestOptions.query || {};
                        params.requestOptions.query.token = "nXKRnEHxOLrxxxxxxxxxxxxxxtU4amjZzsrI.";//Get the token from https://token.slip.wa.gov.au/arcgis/tokens/
                    },
                });

            const layer = new FeatureLayer({
                url: featureLayerUrl
            });

            map.add(layer);

            view.ui.move(["zoom"], "bottom-left");

        });
    &amp;lt;/script&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 08:30:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1042778#M72322</guid>
      <dc:creator>ZohaibUddinKhan</dc:creator>
      <dc:date>2021-04-01T08:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a secured feature service using a token in 4.X?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1042907#M72326</link>
      <description>&lt;P&gt;Check all the network requests to that domain and verify that the token is appended to the URL. Maybe a token source URL permission issue?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 15:19:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1042907#M72326</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-04-01T15:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a secured feature service using a token in 4.X?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1043304#M72332</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;&amp;nbsp;for the reply and help. I can see the token is getting appended in the URL, but maybe CORS is the problem. Trying to find the solution to overcome it. If you have any suggestions then feel free to share.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Esri-Token-Cors.PNG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/9970i2D2F163588715370/image-size/large?v=v2&amp;amp;px=999" role="button" title="Esri-Token-Cors.PNG" alt="Esri-Token-Cors.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 06:59:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1043304#M72332</guid>
      <dc:creator>ZohaibUddinKhan</dc:creator>
      <dc:date>2021-04-02T06:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a secured feature service using a token in 4.X?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1043380#M72337</link>
      <description>&lt;P&gt;You'll need to enable CORS at the server level to fix this. How you do that can vary based on the type of server.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 15:23:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1043380#M72337</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-04-02T15:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a secured feature service using a token in 4.X?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1056303#M73020</link>
      <description>&lt;P&gt;Are there parameters for Editing? I see your example shows Query Parameters but what about if I need to edit this?&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 17:09:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1056303#M73020</guid>
      <dc:creator>jaykapalczynski</dc:creator>
      <dc:date>2021-05-10T17:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a secured feature service using a token in 4.X?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1056304#M73021</link>
      <description>&lt;P&gt;I see that you are adding Query Parameters.....are there Edit parameters for editing?&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 17:10:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1056304#M73021</guid>
      <dc:creator>jaykapalczynski</dc:creator>
      <dc:date>2021-05-10T17:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a secured feature service using a token in 4.X?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1056333#M73024</link>
      <description>&lt;P&gt;I don't know if this was available when this post was made, maybe, and I missed it, happens. But the layers have a property called customParameters you can use to add tokens like this.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#customParameters" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#customParameters&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In this case, you can avoid using an interceptor to add url params.&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 18:18:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1056333#M73024</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-05-10T18:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a secured feature service using a token in 4.X?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1115530#M75228</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I needed also to change in the security option the support for two options:&lt;/P&gt;&lt;P&gt;"allowHttpPostQueryParams"&lt;/P&gt;&lt;P&gt;"allowHttpGet"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;under arcgis server admin -- &amp;gt; security --&amp;gt; tokens&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Nov 2021 07:05:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1115530#M75228</guid>
      <dc:creator>ShmuelKatorzaDAO</dc:creator>
      <dc:date>2021-11-10T07:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a secured feature service using a token in 4.X?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1358844#M83072</link>
      <description>&lt;P&gt;Thank you, it really works and not only for a feature layer. Is it possible to do the same thing for array of layers or I should use this script for each needed layer separately?&lt;/P&gt;&lt;P&gt;Update: solved. I understood that&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;esriConfig.request.interceptors.push&lt;/LI-CODE&gt;&lt;P&gt;means that interceptors is array so we can add several elements into it.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Dec 2023 08:55:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-add-a-secured-feature-service-using-a/m-p/1358844#M83072</guid>
      <dc:creator>ekleiman22</dc:creator>
      <dc:date>2023-12-09T08:55:53Z</dc:date>
    </item>
  </channel>
</rss>

