<?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 How to attach token to addFeatures post? in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-attach-token-to-addfeatures-post/m-p/259904#M10037</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im trying to 'addFeatures' to a server feature service but keep getting the error:&lt;/P&gt;&lt;P&gt;"error": {&lt;BR /&gt; "code": 499,&lt;BR /&gt; "message": "Token Required",&lt;BR /&gt; "details": []&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My token is legit but I don't think i'm attaching it to my request properly. I've put the relevant part of my script below. Where does my error lie? Its my first time trying to add features to a service.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;request = urllib2.Request(endPoint, {'Content-Type': 'application/json'})&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;request.add_header ('Authorization', 'token %s' %&amp;nbsp;&lt;SPAN&gt;Token &lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;response = urllib2.urlopen(request, data).read()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Sep 2016 01:34:31 GMT</pubDate>
    <dc:creator>GregStevenson</dc:creator>
    <dc:date>2016-09-30T01:34:31Z</dc:date>
    <item>
      <title>How to attach token to addFeatures post?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-attach-token-to-addfeatures-post/m-p/259904#M10037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im trying to 'addFeatures' to a server feature service but keep getting the error:&lt;/P&gt;&lt;P&gt;"error": {&lt;BR /&gt; "code": 499,&lt;BR /&gt; "message": "Token Required",&lt;BR /&gt; "details": []&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My token is legit but I don't think i'm attaching it to my request properly. I've put the relevant part of my script below. Where does my error lie? Its my first time trying to add features to a service.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;request = urllib2.Request(endPoint, {'Content-Type': 'application/json'})&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;request.add_header ('Authorization', 'token %s' %&amp;nbsp;&lt;SPAN&gt;Token &lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;response = urllib2.urlopen(request, data).read()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 01:34:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-attach-token-to-addfeatures-post/m-p/259904#M10037</guid>
      <dc:creator>GregStevenson</dc:creator>
      <dc:date>2016-09-30T01:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to attach token to addFeatures post?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-attach-token-to-addfeatures-post/m-p/259905#M10038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The token isn't a header, it should be included in the body of the request. &amp;nbsp;Include it within the data variable you're sending along with the request, (along with the add features JSON).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 16:42:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-attach-token-to-addfeatures-post/m-p/259905#M10038</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2016-09-30T16:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to attach token to addFeatures post?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-attach-token-to-addfeatures-post/m-p/259906#M10039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nailed it. Thanks Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Oct 2016 22:31:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-attach-token-to-addfeatures-post/m-p/259906#M10039</guid>
      <dc:creator>GregStevenson</dc:creator>
      <dc:date>2016-10-02T22:31:36Z</dc:date>
    </item>
  </channel>
</rss>

