Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArcGIS Maps SDK invalid API Key Error #504

Open
pixlhero opened this issue Aug 14, 2024 · 5 comments
Open

ArcGIS Maps SDK invalid API Key Error #504

pixlhero opened this issue Aug 14, 2024 · 5 comments

Comments

@pixlhero
Copy link

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
Copy link
Collaborator

yo1995 commented Aug 14, 2024

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
Copy link

@pixlhero
Copy link
Author

@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.

@RakeshTylerTech
Copy link

ArcGIS Maps SDK invalid API Key Error: The API key '*j2Qde' is invalid, expired, or does not have access to the resource 'https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/webmaps/arcgis/oceans'. 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:
iphone 15 pro (17.5)
Xcode 15.4
SPM : 200.5.1

@yo1995
Copy link
Collaborator

yo1995 commented Dec 2, 2024

ArcGIS Maps SDK invalid API Key Error: The API key '*j2Qde' is invalid, expired, or does not have access to the resource 'https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/webmaps/arcgis/oceans'. 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: iphone 15 pro (17.5) Xcode 15.4 SPM : 200.5.1

Can you either try creating a new API key following this tutorial, or go to the ArcGIS portal and check if the location services privileges are toggled on for your API key? Let me know the results as we are curious to see the root cause. Thank you!

Screenshot 2024-12-02 at 9 57 42 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants