Using the ArcGIS API for Python, when I create my GIS object:
gis = GIS(config["agol"]["agol_gis_url"], config["agol"]["agol_gis_user"], config["agol"]["agol_gis_pass"])
I can verify that it connects by checking if I have a token:
token = gis._con.token
print(token)
But If I try to create a FeatureLayer and search, I get an authentication error (499):
p = FeatureLayer(config["agol"]["resource_locs_fs_url"])
result = gis.content.search("id:{0}".format(p.properties.serviceItemId))
Error running result = gis.content.search("id:{0}".format(p.properties.serviceItemId)) in 'C:\test\main.py'. Message: (Error Code: 499)
If I go into ArcGIS Online and share the item to Everyone, the code works fine. However, the item needs to be secured, so that is not an option. Shouldn't my gis object grant me access to the item?