<?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: Give access to the Hosted feature service using Token access in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/give-access-to-the-hosted-feature-service-using/m-p/1384871#M38686</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/400739"&gt;@HenryLindemann&lt;/a&gt;, Sure, we are hosting the feature service in the &lt;STRONG&gt;ArcGIS Enterprsise&lt;/STRONG&gt;, our client wants to integrate the &lt;STRONG&gt;hosted feature service&lt;/STRONG&gt; in their system, its a &lt;STRONG&gt;web based system&lt;/STRONG&gt;, so they have asked for the &lt;STRONG&gt;Rest service&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;so we have sent the&amp;nbsp;&lt;A href="https://portal.de/server/rest/services/Hosted/point/FeatureServer" target="_self" rel="nofollow noopener noreferrer"&gt;https://portal.de/server/rest/services/Hosted/point/FeatureServer&lt;/A&gt;&amp;nbsp;service. But they tried to use the service and integrate in the system they get an error &lt;STRONG&gt;"Token required".&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;They have access to our enterprise system using credentials. The question is how do I create a token and attach to the Feature service so that they can access the service and integrate in their system.&lt;/P&gt;&lt;P&gt;We have Server Administrator for creating tokens, but I am not sure how this workflow goes.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Feb 2024 14:06:21 GMT</pubDate>
    <dc:creator>AravinthkumarBalasubramanian</dc:creator>
    <dc:date>2024-02-21T14:06:21Z</dc:date>
    <item>
      <title>Give access to the Hosted feature service using Token access</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/give-access-to-the-hosted-feature-service-using/m-p/1384805#M38675</link>
      <description>&lt;P&gt;Hello All,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have a Hosted feature service in the ArcGIS Enterprise, one of the client wanted to access the feature service using Rest services, so I have shared the feature service URL&amp;nbsp;&lt;A href="https://portal.de/server/rest/services/Hosted/point/FeatureServer" target="_self"&gt;https://portal.de/server/rest/services/Hosted/point/FeatureServer&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But when they wanted to use the layer in their system, it asks for a Token. So I have done some search and found this &lt;A href="https://enterprise.arcgis.com/zh-cn/server/latest/administer/linux/enable-token-acquisition-through-an-http-get-request.htm" target="_self"&gt;https://enterprise.arcgis.com/zh-cn/server/latest/administer/linux/enable-token-acquisition-through-an-http-get-request.htm&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;And I have enabled the token acquisiton, in the Server admin, But I don't understand this&amp;nbsp;&lt;A href="https://developers.arcgis.com/rest/users-groups-and-items/generate-token.htm" target="_self"&gt;https://developers.arcgis.com/rest/users-groups-and-items/generate-token.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;To generate a token and link to the feature service, as I am very new to this some detailed explanation will be very helpful. Thank you.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;H1&gt;&amp;nbsp;&lt;/H1&gt;</description>
      <pubDate>Wed, 21 Feb 2024 10:34:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/give-access-to-the-hosted-feature-service-using/m-p/1384805#M38675</guid>
      <dc:creator>AravinthkumarBalasubramanian</dc:creator>
      <dc:date>2024-02-21T10:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: Give access to the Hosted feature service using Token access</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/give-access-to-the-hosted-feature-service-using/m-p/1384814#M38677</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/727074"&gt;@AravinthkumarBalasubramanian&lt;/a&gt;, so it does depend on your workflow, the below code is how you do it in python, but if your client has ArcGIS Enterprise then, you can just setup a secured service,&lt;/P&gt;&lt;P&gt;Under content new item&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HenryLindemann_0-1708513720277.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/95349i660900B91A630757/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HenryLindemann_0-1708513720277.png" alt="HenryLindemann_0-1708513720277.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;all that you are trying to build is&amp;nbsp;&lt;A href="https://portal.de/server/rest/services/Hosted/point/FeatureServer" target="_self" rel="nofollow noopener noreferrer"&gt;https://portal.de/server/rest/services/Hosted/point/FeatureServer&lt;/A&gt;/{layerid}?token={token}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;requests&lt;BR /&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;json&lt;BR /&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;logging&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;def &lt;/SPAN&gt;&lt;SPAN&gt;get_token_portal&lt;/SPAN&gt;(portal_admin_url, portal_username, portal_password, referer):&lt;BR /&gt;    url = &lt;SPAN&gt;f"&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;portal_admin_url&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;/sharing/rest/generateToken"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;    payload = { &lt;SPAN&gt;'f'&lt;/SPAN&gt;: &lt;SPAN&gt;'json'&lt;/SPAN&gt;,&lt;BR /&gt;                &lt;SPAN&gt;'username'&lt;/SPAN&gt;: portal_username,&lt;BR /&gt;                &lt;SPAN&gt;'password'&lt;/SPAN&gt;: portal_password,&lt;BR /&gt;                &lt;SPAN&gt;'client'&lt;/SPAN&gt;: &lt;SPAN&gt;'referer'&lt;/SPAN&gt;,&lt;BR /&gt;                &lt;SPAN&gt;'referer'&lt;/SPAN&gt;: referer,&lt;BR /&gt;                &lt;SPAN&gt;'expiration'&lt;/SPAN&gt;: &lt;SPAN&gt;'100'&lt;/SPAN&gt;}&lt;BR /&gt;    headers = {&lt;BR /&gt;        &lt;SPAN&gt;'content-type'&lt;/SPAN&gt;: &lt;SPAN&gt;"application/x-www-form-urlencoded"&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;'accept'&lt;/SPAN&gt;: &lt;SPAN&gt;"application/json"&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;'cache-control'&lt;/SPAN&gt;: &lt;SPAN&gt;"no-cache"&lt;/SPAN&gt;,&lt;BR /&gt;        }&lt;BR /&gt;&lt;BR /&gt;    response = requests.request(&lt;SPAN&gt;"POST"&lt;/SPAN&gt;, url, &lt;SPAN&gt;data&lt;/SPAN&gt;=payload, &lt;SPAN&gt;headers&lt;/SPAN&gt;=headers, &lt;SPAN&gt;verify&lt;/SPAN&gt;=&lt;SPAN&gt;False&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN&gt;return &lt;/SPAN&gt;json.loads(response.text)[&lt;SPAN&gt;'token'&lt;/SPAN&gt;]&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;def &lt;/SPAN&gt;&lt;SPAN&gt;query_rest&lt;/SPAN&gt;(url, token, other_parameters=&lt;SPAN&gt;None&lt;/SPAN&gt;, type=&lt;SPAN&gt;"POST"&lt;/SPAN&gt;):&lt;BR /&gt;    &lt;SPAN&gt;"""url Root URL with webadaptor"""&lt;BR /&gt;&lt;/SPAN&gt;    url = &lt;SPAN&gt;f"&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;url&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;    payload = {&lt;BR /&gt;        &lt;SPAN&gt;'f'&lt;/SPAN&gt;: &lt;SPAN&gt;'json'&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;'token'&lt;/SPAN&gt;: token&lt;BR /&gt;    }&lt;BR /&gt;&lt;BR /&gt;    headers = {&lt;BR /&gt;        &lt;SPAN&gt;'content-type'&lt;/SPAN&gt;: &lt;SPAN&gt;"application/x-www-form-urlencoded"&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;'accept'&lt;/SPAN&gt;: &lt;SPAN&gt;"application/json"&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;'cache-control'&lt;/SPAN&gt;: &lt;SPAN&gt;"no-cache"&lt;/SPAN&gt;,&lt;BR /&gt;    }&lt;BR /&gt;    &lt;SPAN&gt;if &lt;/SPAN&gt;other_parameters &lt;SPAN&gt;is None&lt;/SPAN&gt;:&lt;BR /&gt;        response = requests.request(type, url, &lt;SPAN&gt;data&lt;/SPAN&gt;=payload, &lt;SPAN&gt;headers&lt;/SPAN&gt;=headers, &lt;SPAN&gt;verify&lt;/SPAN&gt;=&lt;SPAN&gt;False&lt;/SPAN&gt;)&lt;BR /&gt;    &lt;SPAN&gt;else&lt;/SPAN&gt;:&lt;BR /&gt;        response = requests.request(type, url, &lt;SPAN&gt;params&lt;/SPAN&gt;=other_parameters, &lt;SPAN&gt;data&lt;/SPAN&gt;=payload, &lt;SPAN&gt;headers&lt;/SPAN&gt;=headers, &lt;SPAN&gt;verify&lt;/SPAN&gt;=&lt;SPAN&gt;False&lt;/SPAN&gt;)&lt;BR /&gt;    &lt;SPAN&gt;if &lt;/SPAN&gt;response.text == &lt;SPAN&gt;""&lt;/SPAN&gt;:&lt;BR /&gt;        &lt;SPAN&gt;return None&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    return &lt;/SPAN&gt;json.loads(response.text)&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if &lt;/SPAN&gt;__name__ == &lt;SPAN&gt;"__main__"&lt;/SPAN&gt;:&lt;BR /&gt;    portal_admin_url = &lt;SPAN&gt;'https://e1091.esri-southafrica.com/portal'&lt;BR /&gt;&lt;/SPAN&gt;    username = &lt;SPAN&gt;'portaladmin'&lt;BR /&gt;&lt;/SPAN&gt;    password = &lt;SPAN&gt;'password'&lt;BR /&gt;&lt;/SPAN&gt;    server_url = &lt;SPAN&gt;"https://e1091.esri-southafrica.com/server/rest"&lt;BR /&gt;&lt;/SPAN&gt;    token_portal = get_token_portal(portal_admin_url, username, password, server_url)&lt;BR /&gt;&lt;BR /&gt;    req_export_backup = &lt;SPAN&gt;f"&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;server_url&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;/services/Hosted/service_8f8eccce65394272b49be5fb6f2e9087/FeatureServer/0"&lt;BR /&gt;&lt;/SPAN&gt;    response_version = query_rest(req_export_backup, token_portal, &lt;SPAN&gt;type&lt;/SPAN&gt;=&lt;SPAN&gt;"POST"&lt;/SPAN&gt;)&lt;BR /&gt;    &lt;SPAN&gt;print&lt;/SPAN&gt;(&lt;SPAN&gt;f"Result: &lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;response_version&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 21 Feb 2024 11:09:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/give-access-to-the-hosted-feature-service-using/m-p/1384814#M38677</guid>
      <dc:creator>HenryLindemann</dc:creator>
      <dc:date>2024-02-21T11:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Give access to the Hosted feature service using Token access</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/give-access-to-the-hosted-feature-service-using/m-p/1384817#M38678</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/400739"&gt;@HenryLindemann&lt;/a&gt;,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you for the clear explanation, Yes, my client has ESRI Enterprise access, so should I create&amp;nbsp; a &lt;STRONG&gt;URL&lt;/STRONG&gt; in the &lt;STRONG&gt;"New Item"&amp;nbsp; ?&amp;nbsp;&lt;/STRONG&gt;Kindly can you elaborate on that. Thank you.:-)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 11:14:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/give-access-to-the-hosted-feature-service-using/m-p/1384817#M38678</guid>
      <dc:creator>AravinthkumarBalasubramanian</dc:creator>
      <dc:date>2024-02-21T11:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Give access to the Hosted feature service using Token access</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/give-access-to-the-hosted-feature-service-using/m-p/1384830#M38679</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/727074"&gt;@AravinthkumarBalasubramanian&lt;/a&gt;&amp;nbsp;, yes under new item select web, you should see this page,&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HenryLindemann_0-1708516764825.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/95350i7AD5CAD70DC79052/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HenryLindemann_0-1708516764825.png" alt="HenryLindemann_0-1708516764825.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;then select store credentials this is so that your client does not log in every time he opens the service, you log in with a user account on your system that has access to the service.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HenryLindemann_1-1708516863270.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/95351i8A4BB2A21A81A0CB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HenryLindemann_1-1708516863270.png" alt="HenryLindemann_1-1708516863270.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then just save&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HenryLindemann_2-1708516889754.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/95352i0666462C1246E7E9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HenryLindemann_2-1708516889754.png" alt="HenryLindemann_2-1708516889754.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 12:02:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/give-access-to-the-hosted-feature-service-using/m-p/1384830#M38679</guid>
      <dc:creator>HenryLindemann</dc:creator>
      <dc:date>2024-02-21T12:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Give access to the Hosted feature service using Token access</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/give-access-to-the-hosted-feature-service-using/m-p/1384839#M38680</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/400739"&gt;@HenryLindemann&lt;/a&gt;,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;But this just creates another feature layer with the same data in it, but how do I share it like this&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://portal.de/server/rest/services/Hosted/point/FeatureServer" target="_self" rel="nofollow noopener noreferrer"&gt;https://portal.de/server/rest/services/Hosted/point/FeatureServer&lt;/A&gt;&lt;SPAN&gt;/{layerid}?token={token}&amp;nbsp; I don't see the feature service in the ArcGIS rest service Directory.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 12:22:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/give-access-to-the-hosted-feature-service-using/m-p/1384839#M38680</guid>
      <dc:creator>AravinthkumarBalasubramanian</dc:creator>
      <dc:date>2024-02-21T12:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Give access to the Hosted feature service using Token access</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/give-access-to-the-hosted-feature-service-using/m-p/1384869#M38685</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/727074"&gt;@AravinthkumarBalasubramanian&lt;/a&gt;&amp;nbsp;, can you give me the scenario of how you want to use the data?&lt;/P&gt;&lt;P&gt;The service will not display in the rest because it is coming from your server but you will be able to query it and use it in portal for ArcGIS.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Henry&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 13:51:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/give-access-to-the-hosted-feature-service-using/m-p/1384869#M38685</guid>
      <dc:creator>HenryLindemann</dc:creator>
      <dc:date>2024-02-21T13:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: Give access to the Hosted feature service using Token access</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/give-access-to-the-hosted-feature-service-using/m-p/1384871#M38686</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/400739"&gt;@HenryLindemann&lt;/a&gt;, Sure, we are hosting the feature service in the &lt;STRONG&gt;ArcGIS Enterprsise&lt;/STRONG&gt;, our client wants to integrate the &lt;STRONG&gt;hosted feature service&lt;/STRONG&gt; in their system, its a &lt;STRONG&gt;web based system&lt;/STRONG&gt;, so they have asked for the &lt;STRONG&gt;Rest service&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;so we have sent the&amp;nbsp;&lt;A href="https://portal.de/server/rest/services/Hosted/point/FeatureServer" target="_self" rel="nofollow noopener noreferrer"&gt;https://portal.de/server/rest/services/Hosted/point/FeatureServer&lt;/A&gt;&amp;nbsp;service. But they tried to use the service and integrate in the system they get an error &lt;STRONG&gt;"Token required".&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;They have access to our enterprise system using credentials. The question is how do I create a token and attach to the Feature service so that they can access the service and integrate in their system.&lt;/P&gt;&lt;P&gt;We have Server Administrator for creating tokens, but I am not sure how this workflow goes.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 14:06:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/give-access-to-the-hosted-feature-service-using/m-p/1384871#M38686</guid>
      <dc:creator>AravinthkumarBalasubramanian</dc:creator>
      <dc:date>2024-02-21T14:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: Give access to the Hosted feature service using Token access</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/give-access-to-the-hosted-feature-service-using/m-p/1384918#M38689</link>
      <description>&lt;P&gt;So far I have used this script and generated a token and added to the Feature service like this example,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://portal.de/server/rest/services/Hosted/point/FeatureServer?token=affcx78d4c5xfc" target="_blank"&gt;https://portal.de/server/rest/services/Hosted/point/FeatureServer?token=affcx78d4c5xfc &lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;But if I open the url it refreshs automatically multiple times. So How do I share the Hosted feature service with the token to the Client, kindly help me to understand the concept.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS

parameters ={
    "PortalURL": "",
    "PortalUserName": "",
    "PortalPassword": ""
}

for keys, values in parameters.items():
    url = parameters['PortalURL']
    username = parameters['PortalUserName']
    password = parameters['PortalPassword']
    
gis = GIS(url, username, password)

token = gis._con.token
print(f"Your ArcGIS token is: {token}")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 15:33:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/give-access-to-the-hosted-feature-service-using/m-p/1384918#M38689</guid>
      <dc:creator>AravinthkumarBalasubramanian</dc:creator>
      <dc:date>2024-02-21T15:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Give access to the Hosted feature service using Token access</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/give-access-to-the-hosted-feature-service-using/m-p/1385308#M38693</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/727074"&gt;@AravinthkumarBalasubramanian&lt;/a&gt;, the token is a security mechanism that allows you to log into a service via an application, it is usually has a short life e.g. 2 hrs.' then you need a new token, if your client has a custom webpage, he needs to generate a token and attach it to the service. The token you have in the above code will not work because it is for use in portal, please see this sample on how to connect the service using java script you just need to Registe an Api key, instead of the token, but the tutorial will show you how to do that.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/tutorials/add-a-feature-layer/" target="_blank"&gt;Add a feature layer | Overview | ArcGIS Maps SDK for JavaScript 4.28 | ArcGIS Developers&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Henry&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 06:33:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/give-access-to-the-hosted-feature-service-using/m-p/1385308#M38693</guid>
      <dc:creator>HenryLindemann</dc:creator>
      <dc:date>2024-02-22T06:33:11Z</dc:date>
    </item>
  </channel>
</rss>

