I'm trying to test out retrieving a feature layer using the REST api. I have code that issues a /generateToken POST request that successfully returns a token, but then when I issue a subsequent GET request with
?token=<token returned from generateToken>
I gat an error message of "Invalid token".
Here is a screenshot of the GET request in Postman (I used a token that was generated seconds before issuing the GET request).
Here's the format of the url that I'm using to try to retrieve the feature layer (I'm not 100% certain that the url is correct):
https://services7.arcgis.com/XXYYXXYYZZ/arcgis/rest/services/Name_of_feature_Layer/FeatureServer?token=xxxxxxxxxxxx
Greetings @DonaldPike
Have a look at the article from our friends from Esri Australia titled FAQ: How do I generate a token in ArcGIS Online for accessing secure resources?
Hope that helps.
Hello and thanks for the info @MiguelParedes
I'm actually already able to successfully generate a token with the generateToken POST request.
Where I'm having problems is with a subsequent GET request to retrieve a feature layer from a feature service. Something about how the GET request is constructed is not in the format that the server is expecting.