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

Can't access latest photos #118

Closed
lamartm opened this issue Feb 8, 2021 · 6 comments
Closed

Can't access latest photos #118

lamartm opened this issue Feb 8, 2021 · 6 comments

Comments

@lamartm
Copy link

lamartm commented Feb 8, 2021

Hi using the API for a school project, when I try to access the latest photos I get an "API_KEY_MISSING" message. I tried my api key with different endpoints and it seems to be working there..

@corincerami
Copy link
Owner

Hi, without including your actual key, can you tell me how you're trying to access the API? What URL are you using?

@lamartm
Copy link
Author

lamartm commented Feb 12, 2021

Hi, without including your actual key, can you tell me how you're trying to access the API? What URL are you using?

I'm using the URL mentioned in the read me on Query for Latest Photo to try to access it: https://api.nasa.gov/mars-photos/api/v1/rovers/curiosity/latest_photos

@corincerami
Copy link
Owner

You need to add your API key to that endpoint. How are you adding the API key?

@lamartm
Copy link
Author

lamartm commented Feb 12, 2021

You need to add your API key to that endpoint. How are you adding the API key?

https://api.nasa.gov/mars-photos/api/v1/rovers/curiosity/latest_photos&api_key=DEMO_KEY

@corincerami
Copy link
Owner

I see. You need to put a ? at the beginning of parameters in a URL. A & is meant to separate multiple parameters. So your URL should look like https://api.nasa.gov/mars-photos/api/v1/rovers/curiosity/latest_photos?api_key=DEMO_KEY

@lamartm
Copy link
Author

lamartm commented Feb 12, 2021

I see. You need to put a ? at the beginning of parameters in a URL. A & is meant to separate multiple parameters. So your URL should look like https://api.nasa.gov/mars-photos/api/v1/rovers/curiosity/latest_photos?api_key=DEMO_KEY

Oh god, mistake on my part! Thanks for your time!

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

2 participants