<?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: Authentification problem when using Urban API in ArcGIS Urban Questions</title>
    <link>https://community.esri.com/t5/arcgis-urban-questions/authentification-problem-when-using-urban-api/m-p/1093578#M147</link>
    <description>&lt;P&gt;Thanks for this question,&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/118250"&gt;@MaximeDemers&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a question regarding the Urban API and seems to be a duplicate of&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-urban-api-questions/authentification-problem-using-arcpy/m-p/1093570#M4" target="_blank"&gt;https://community.esri.com/t5/arcgis-urban-api-questions/authentification-problem-using-arcpy/m-p/1093570#M4&lt;/A&gt;. Please follow the thread there. Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 30 Aug 2021 14:03:05 GMT</pubDate>
    <dc:creator>Till_Schmid</dc:creator>
    <dc:date>2021-08-30T14:03:05Z</dc:date>
    <item>
      <title>Authentification problem when using Urban API</title>
      <link>https://community.esri.com/t5/arcgis-urban-questions/authentification-problem-when-using-urban-api/m-p/1093568#M146</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to use the Urban API but I got authentification error:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GraphQL query failed with 1 errors&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;[{'message': 'The access token provided is invalid or expired.', 'extensions': {'code': 'UNAUTHENTICATED'}}]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Im not sure why the token provided to the urban api url is not working because it was generated using arcpy like below:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
from sgqlc.operation import Operation
from sgqlc.endpoint.http import HTTPEndpoint
from urban_api_schema import urban_api_schema as schema

arcpy.SignInToPortal("https://www.arcgis.com", "myUserName", "MyPasswOrd")
#token is generated correctly
token = arcpy.GetSigninToken()
urban_api_url = "https://urban-api.arcgis.com/graphql" + '?token=' + token['token']

endpoint = HTTPEndpoint(urban_api_url)

#here it's the function that call the api to update the parcels
for parcel_chunk in parcels_chunks:
  op = Operation(schema.Mutation)
  create_parcels = op.create_parcels(urban_database_id="1c80e3e815594fd288d347e132138f0a", parcels=parcel_chunk)
  create_parcels.attributes.__fields__('global_id')

  json_data = endpoint(op)
    errors = json_data.get('errors')
  if errors:
    print(errors)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 30 Aug 2021 13:38:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-urban-questions/authentification-problem-when-using-urban-api/m-p/1093568#M146</guid>
      <dc:creator>MaximeDemers</dc:creator>
      <dc:date>2021-08-30T13:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: Authentification problem when using Urban API</title>
      <link>https://community.esri.com/t5/arcgis-urban-questions/authentification-problem-when-using-urban-api/m-p/1093578#M147</link>
      <description>&lt;P&gt;Thanks for this question,&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/118250"&gt;@MaximeDemers&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a question regarding the Urban API and seems to be a duplicate of&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-urban-api-questions/authentification-problem-using-arcpy/m-p/1093570#M4" target="_blank"&gt;https://community.esri.com/t5/arcgis-urban-api-questions/authentification-problem-using-arcpy/m-p/1093570#M4&lt;/A&gt;. Please follow the thread there. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 14:03:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-urban-questions/authentification-problem-when-using-urban-api/m-p/1093578#M147</guid>
      <dc:creator>Till_Schmid</dc:creator>
      <dc:date>2021-08-30T14:03:05Z</dc:date>
    </item>
  </channel>
</rss>

