Select to view content in your preferred language

Accessing Landsat and Sentinel Services with Esri JS version 3

01-26-2022 02:06 PM
New Contributor II

I'm trying to access sentinel 2 and landsat through Esri JS version 3.39 at the following urls:

According to the documentation, you can access the services in the following manner.

Important Note: This item requires an ArcGIS Online organizational subscription or an ArcGIS Developer account and does not consume credits. To access this item, you'll need to do one of the following:
  • Sign in with an account that is a member of an organizational subscription
  • Sign in with a developer account
  • Register an application and use your application's credentials.

I have created an api key through the developer dashboard and tried to set the apiKey in esriConfig.
esri.config.apiKey = "myApiKeyHere";
I have also attempted to pass it in the url  with url?token=myApiKeyHEre

When I try to call ImageServiceIdentifyTask, I get the following response

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

I have also attempted to use the generateToken link here

Upon entering my credentials, I get the following message:

You are not authorized to access this information

What is the correct method to authenticate with these services using Esri JS version 3.39?

0 Kudos
0 Replies