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 API key at a global level for your application using this property, you can set an ApiKey property on any ArcGIS Runtime class that implements IApiKeyResource. When you set an individual ApiKey property on an IApiKeyResource it will override the default key at the global level (on the this property, in other words), enabling more granular usage telemetry and management for ArcGIS Online resources used by your app.

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

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

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

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.10 - 100.14
.NET 6.0100.13 - 100.14
.NET 6.0 Windows100.13 - 100.14
.NET Framework100.10 - 100.14
.NET 5100.10 - 100.12
.NET Core 3.1100.10 - 100.12
Xamarin.Android100.10 - 100.14
Xamarin.iOS100.10 - 100.14
UWP100.10 - 100.14
In This Article
Back to top Copyright © 2021 Esri.