AnsweredAssumed Answered

How to attach token to addFeatures post?

Question asked by greg.stevenson on Sep 29, 2016
Latest reply on Oct 2, 2016 by greg.stevenson

Hi all,


Im trying to 'addFeatures' to a server feature service but keep getting the error:

"error": {
"code": 499,
"message": "Token Required",
"details": []


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.



request = urllib2.Request(endPoint, {'Content-Type': 'application/json'})


request.add_header ('Authorization', 'token %s' % Token )

response = urllib2.urlopen(request, data).read()