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

Setting the Ion Token throws a 401 error with Invalid Credentials #629

Open
leeprobert opened this issue Sep 24, 2023 · 0 comments
Open

Comments

@leeprobert
Copy link

I'm settting the Ion token in my app but when I do it throws a 401 error:

RequestErrorEvent {statusCode: 401, response: '{"code":"InvalidCredentials","message":"No authorization token was found"}', responseHeaders: {…}}

I'm setting the tokens for both Ion and GoogleMaps:

import { Ion, GoogleMaps } from 'cesium'
GoogleMaps.defaultApiKey = process.env.REACT_APP_GOOGLE_MAPS_API_KEY;
Ion.defaultAccessToken = process.env.REACT_APP_CESIUM_ION_TOKEN;

I only get the error when I set the tokens and API key for Google Maps. If I don't set the API key I get the error.

The message onscreen only complains about the Google Maps Key which suggests it has set the Ion token so the error could be thrown before it has set the token.

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

1 participant