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()
Thanks,
Greg
Solved! Go to Solution.
The token isn't a header, it should be included in the body of the request. Include it within the data variable you're sending along with the request, (along with the add features JSON).
The token isn't a header, it should be included in the body of the request. Include it within the data variable you're sending along with the request, (along with the add features JSON).
Nailed it. Thanks Jonathan