Esri / arcgis-maps-sdk-swift-samples

SwiftUI samples demonstrating various capabilities of ArcGIS Maps SDK for Swift
https://developers.arcgis.com/swift
Apache License 2.0
31 stars 9 forks source link

ArcGIS Maps SDK invalid API Key Error #504

Open pixlhero opened 2 months ago

pixlhero commented 2 months ago

I created an API key with all the privileges and added it to the .secrets file. But I still get the error

ArcGIS Maps SDK invalid API Key Error: The API key '*j9CKE' is invalid, expired, or does not have access to the resource 'https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/webmaps/arcgis/dark-gray'. Please visit https://developers.arcgis.com/api-keys to configure the API key to access the resource, or to create a new API key.

Is there anything I forgot?

Device: iPad (10th Gen) iPadOS 17.3.1 Xcode 15.4

yo1995 commented 2 months ago

Thanks for asking the question. If you have configured the privileges correctly, it should just work so I'm not sure what's up here. 🤔

Do you have an Esri Community account? You can sign up and ping me via DM and we can try to figure it out there.

If you have a key that is known to be working for other applications, try that and compare result.

iamweijun commented 2 months ago

@pixlhero You can refer to this post, it also works for me. https://community.esri.com/t5/net-maps-sdk-questions/wpf-app-with-api-key-not-working/m-p/1516657

pixlhero commented 2 months ago

@pixlhero You can refer to this post, it also works for me. https://community.esri.com/t5/net-maps-sdk-questions/wpf-app-with-api-key-not-working/m-p/1516657

That wasn't the issue, but thanks.