Select to view content in your preferred language

403: User does not have permissions to access this service

611
1
10-10-2023 10:51 AM
BrianWhite70
New Contributor

I am a trial Admin user, but do not seem to have permissions to do certain things ( like programmatically create a feature layer, or ask for  getServiceAdminInfo for a Feature layer I created in the ui.  It just returns 403.  I am using an API key i created that has been given access to any content I created through the console ui.  I am able to programmatically add features.

What am I missing?

 

0 Kudos
1 Reply
John-Foster
Esri Contributor

@BrianWhite70you cannot use an API key to create Feature Layers or create new content items. API keys are designed for service access requests. To create data you will need to use a logged in user access token obtained through the OAuth 2 authentication process, see https://developers.arcgis.com/documentation/mapping-apis-and-services/security/oauth-2/

 

--jf
0 Kudos