<?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: Call data from privet layer from my App in Esri Training Questions</title>
    <link>https://community.esri.com/t5/esri-training-questions/call-data-from-privet-layer-from-my-app/m-p/815647#M332</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 3.0pt 0in 3.0pt 0in;"&gt;If you are creating a web application using the ArcGIS API for JavaScript, and you try to load a layer that has its sharing level set to "Owner", then yes, when you load that page, the API will try to load that layer; it will find that the sharing level is Owner and will open a login popup for you to login with. As long as the username and password are the same account that the layer is owned by, the layer will load after correct login.&lt;/P&gt;&lt;P style="margin: 3.0pt 0in 3.0pt 0in;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 3.0pt 0in 3.0pt 0in;"&gt;We understand that you tried this, and it still failed to load. This would require just a little bit more troubleshooting. It's possible that the login popup you're getting is for some other resource in your app that is not shared with your account that you logged in with. If you comment out the loading of that layer, and you are still getting that login popup, that would help narrow it down. The idea here is to keep testing until you find the layer that is failing to load, then you can adjust (or request to adjust) the sharing level of that resource. We would recommend you comment out all ArcGIS Online resources, then commenting them back in one at a time, or in groups, in order to find those resources that are opening the login modal and why.&lt;/P&gt;&lt;P style="margin: 3.0pt 0in 3.0pt 0in;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 3.0pt 0in 3.0pt 0in;"&gt;In most cases, that should solve the problem.&lt;/P&gt;&lt;P style="margin: 3.0pt 0in 3.0pt 0in;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 3.0pt 0in 3.0pt 0in;"&gt;We see that you're also asking a question about how to make a private, un-shared layer visible inside your application without requiring user login. There are a few techniques for keeping resources private, and still exposing them to selected applications. One way is to use a proxy. See this document for more information. Go to this page and scroll down to the section called "Application logins". &lt;A href="https://developers.arcgis.com/javascript/latest/guide/secure-resources/"&gt;&lt;SPAN style="color: windowtext;"&gt;https://developers.arcgis.com/javascript/latest/guide/secure-resources/&lt;/SPAN&gt;&lt;/A&gt;Using a proxy is a secure and supported way to accomplish this. It is not recommended to pass your login name and password credentials to the app/page as URL parameters in the clear. If you have difficulties or questions in setting this up, please contact &lt;A href="https://support.esri.com/en"&gt;Technical Support&lt;/A&gt;.&lt;/P&gt;&lt;P style="margin: 3.0pt 0in 3.0pt 0in;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Also, we have a GeoNet community forum specifically for the ArcGIS API for JavaScript. The global community of folks using that API use that forum for Q&amp;amp;A. You will find the best answers and quickest replies there. &lt;A _jive_internal="true" href="https://community.esri.com/community/developers/web-developers/arcgis-api-for-javascript/content"&gt;https://community.esri.com/community/developers/web-developers/arcgis-api-for-javascript/content&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Apr 2020 19:23:00 GMT</pubDate>
    <dc:creator>AmyNiessen</dc:creator>
    <dc:date>2020-04-08T19:23:00Z</dc:date>
    <item>
      <title>Call data from privet layer from my App</title>
      <link>https://community.esri.com/t5/esri-training-questions/call-data-from-privet-layer-from-my-app/m-p/815646#M331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can i connect to the new Layer (My data) that is in the privet me mode from my javascript code? it asked me the Username and password, Itried my Acount password but it didnt work?also is there a way to add user and pasword name at the end of service url in the jason script?&lt;/P&gt;&lt;P&gt;&amp;nbsp;like:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://services7.arcgis.com/vmdU9JnBFQEei09w/arcgis/rest/services/trailheads/FeatureServer" title="https://services7.arcgis.com/vmdU9JnBFQEei09w/arcgis/rest/services/trailheads/FeatureServer"&gt;https://services7.arcgis.com/vmdU9JnBFQEei09w/arcgis/rest/services/trailheads/FeatureServer&lt;/A&gt;&amp;nbsp; /user/pass&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2020 21:13:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-training-questions/call-data-from-privet-layer-from-my-app/m-p/815646#M331</guid>
      <dc:creator>MaryamAnsarisamani</dc:creator>
      <dc:date>2020-04-07T21:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Call data from privet layer from my App</title>
      <link>https://community.esri.com/t5/esri-training-questions/call-data-from-privet-layer-from-my-app/m-p/815647#M332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 3.0pt 0in 3.0pt 0in;"&gt;If you are creating a web application using the ArcGIS API for JavaScript, and you try to load a layer that has its sharing level set to "Owner", then yes, when you load that page, the API will try to load that layer; it will find that the sharing level is Owner and will open a login popup for you to login with. As long as the username and password are the same account that the layer is owned by, the layer will load after correct login.&lt;/P&gt;&lt;P style="margin: 3.0pt 0in 3.0pt 0in;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 3.0pt 0in 3.0pt 0in;"&gt;We understand that you tried this, and it still failed to load. This would require just a little bit more troubleshooting. It's possible that the login popup you're getting is for some other resource in your app that is not shared with your account that you logged in with. If you comment out the loading of that layer, and you are still getting that login popup, that would help narrow it down. The idea here is to keep testing until you find the layer that is failing to load, then you can adjust (or request to adjust) the sharing level of that resource. We would recommend you comment out all ArcGIS Online resources, then commenting them back in one at a time, or in groups, in order to find those resources that are opening the login modal and why.&lt;/P&gt;&lt;P style="margin: 3.0pt 0in 3.0pt 0in;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 3.0pt 0in 3.0pt 0in;"&gt;In most cases, that should solve the problem.&lt;/P&gt;&lt;P style="margin: 3.0pt 0in 3.0pt 0in;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 3.0pt 0in 3.0pt 0in;"&gt;We see that you're also asking a question about how to make a private, un-shared layer visible inside your application without requiring user login. There are a few techniques for keeping resources private, and still exposing them to selected applications. One way is to use a proxy. See this document for more information. Go to this page and scroll down to the section called "Application logins". &lt;A href="https://developers.arcgis.com/javascript/latest/guide/secure-resources/"&gt;&lt;SPAN style="color: windowtext;"&gt;https://developers.arcgis.com/javascript/latest/guide/secure-resources/&lt;/SPAN&gt;&lt;/A&gt;Using a proxy is a secure and supported way to accomplish this. It is not recommended to pass your login name and password credentials to the app/page as URL parameters in the clear. If you have difficulties or questions in setting this up, please contact &lt;A href="https://support.esri.com/en"&gt;Technical Support&lt;/A&gt;.&lt;/P&gt;&lt;P style="margin: 3.0pt 0in 3.0pt 0in;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Also, we have a GeoNet community forum specifically for the ArcGIS API for JavaScript. The global community of folks using that API use that forum for Q&amp;amp;A. You will find the best answers and quickest replies there. &lt;A _jive_internal="true" href="https://community.esri.com/community/developers/web-developers/arcgis-api-for-javascript/content"&gt;https://community.esri.com/community/developers/web-developers/arcgis-api-for-javascript/content&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2020 19:23:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-training-questions/call-data-from-privet-layer-from-my-app/m-p/815647#M332</guid>
      <dc:creator>AmyNiessen</dc:creator>
      <dc:date>2020-04-08T19:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Call data from privet layer from my App</title>
      <link>https://community.esri.com/t5/esri-training-questions/call-data-from-privet-layer-from-my-app/m-p/815648#M333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a tip for troubleshooting which layer might be causing your problem with the login window:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/people/jbarry-esristaff/blog/2020/04/08/tip-load-layers-using-portal-item-id-versus-rest-endpoint-uri"&gt;https://community.esri.com/people/jbarry-esristaff/blog/2020/04/08/tip-load-layers-using-portal-item-id-versus-rest-endpoint-uri&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2020 20:27:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-training-questions/call-data-from-privet-layer-from-my-app/m-p/815648#M333</guid>
      <dc:creator>JimBarry</dc:creator>
      <dc:date>2020-04-08T20:27:35Z</dc:date>
    </item>
  </channel>
</rss>

