Show / Hide Table of Contents

Property ApiKey

ApiKey

Gets or sets the default API key to access API key enabled services and resources in ArcGIS Online.

Declaration
public static string ApiKey { get; set; }
Property Value
Type Description
String

The default API key to access API key enabled services and resources in ArcGIS Online.

Remarks

An API key is a unique key used to authorize access to specific services and resources in ArcGIS Online. It is also used to monitor access to those services. API keys are created and managed in the ArcGIS developer dashboard and are tied to a specific ArcGIS account.

In addition to setting an ApiKey at a global level for your application, you can set it on any class that implements IApiKeyResource. This overrides the ApiKey and enables more granular usage telemetry and management of ArcGIS location resources used by your app.

Classes that expose an API key property by implementing IApiKeyResource include:

  • Basemap
  • ArcGISSceneLayer
  • ArcGISTiledLayer
  • ArcGISVectorTiledLayer
  • ServiceFeatureTable
  • ExportVectorTilesTask
  • LocatorTask
  • GeodatabaseSyncTask
  • ClosestFacilityTask
  • RouteTask
  • ServiceAreaTask
  • ExportTileCacheTask

See Also
SetLicense(LicenseInfo)
SetLicense(String)
SetLicense(String, IEnumerable<String>)

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.10 - 200.2
.NET 6.0100.13 - 200.2
.NET 6.0 Windows100.13 - 200.2
.NET 6.0 Android200.0 - 200.2
.NET 6.0 iOS200.0 - 200.2
.NET Framework100.10 - 200.2
.NET 5100.10 - 100.12
.NET Core 3.1100.10 - 100.12
Android100.10 - 100.15
iOS100.10 - 100.15
UWP100.10 - 200.2
In This Article
Back to top Copyright © 2022 Esri.