Api Key - ArcGIS Runtime 100.10 - Feature Service Access

1851
5
02-19-2021 09:31 AM
Benjamin1
New Contributor II

Good Afternoon, 

I noticed in the release notes for the ArcGIS Runtime 100.10 that API Keys can now be configured for use with Feature Services.   However I've created an API Key and it appears to only allow Location Services to be configured.  I see the Content section under editing the API Key however it spells out that OAuth 2 is the only method of access. 

In general what we are wanting to do is have access to ArcGIS Online and ArcGIS Portal secured services to use within our application.  We would like to avoid the use of individual named user model being this is shipped out to vehicle fleets.   The API Key seems to be a potential solution to this issue.  Any help is appreciated.

Thanks,

Benjamin

 

 

0 Kudos
5 Replies
JoeHershman
MVP Regular Contributor

Based on documentation it would seem the API Key is to allow monitoring of access to services, based on the ones described those are also services that are either free or charged on a unit basis.  

Portal or AGOL require a licensed user (i.e., a user that has paid access).  The only way esri can validate that a user has payed access is if they are assigned a named user account.  If you just used the API key, how could esri track how many users are accessing the services for which they charge.  For offline uses you can have a license key for the application, but if you are online and want a resource, the user accessing that service needs to be validated

Thanks,
-Joe
0 Kudos
Benjamin1
New Contributor II

Thanks for the reply.

To add further here is the link to the release notes I'm mentioning.  It is quite possible I'm miss reading into this.  We don't have offline editing which I know requires additional licensing.  My assumption is the Api Key can track usage while be it application usage.   We can currently access non-secured layers without issue.  However the security model for named users is a bit of bear when dealing with large organizations.  The hopes is a single api key would be useable to access secured services.

Release notes for 100.10.0 | ArcGIS Runtime API for Android | ArcGIS for Developers

API keys
With ArcGIS Runtime 100.10.0, you can access content on ArcGIS Online, such as web maps, web scenes, layers, items, and services, with an API key. An API key is a unique identifier used to provide authenticated access to a secured resource. An API key is similar to a token, but does not expire and can be used to monitor service usage from your apps.

A default API key is created for you when you sign up for an ArcGIS developer account. If you already have an ArcGIS account, you can use your dashboard to edit your default API key or to create new keys. You can configure an API key with the following:

Services your key is permitted to access
Map or layer content (items) accessible with the key, such as hosted feature services, web maps, web scenes, tile layers, and so on

0 Kudos
JoeHershman
MVP Regular Contributor

I'm looking at the documentation for API Keys https://developers.arcgis.com/documentation/security-and-authentication/api-keys/

At the bottom there is a table which lists the services Available services

Followed by, Access content and items (beta)

Only ArcGIS Developer accounts can use API keys to read private content. ArcGIS Organization users should use OAuth 2.0 to obtain ArcGIS identity credentials to read private user content and access services on a user's behalf.

They would need to figure out how to have licensing and the API key tied together.  My guess is that once they work out a plan it would have to go through an account manager to be all setup.

 

 

Thanks,
-Joe
Benjamin1
New Contributor II

Thanks Joe I will look at this info!

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

@Benjamin1 Joe shared the appropriate links above.

To summarize:

Currently only ArcGIS Developers Accounts have the ability to add and manage Content and Items with API keys. 

To access organizations items you should continue to use an ArcGIS Identity, either a named user or application credentials: https://developers.arcgis.com/documentation/security-and-authentication/other-authentication-methods...

Thanks

0 Kudos