Introduction to HTTP APIs in Postman - Check Request 1: pic of the day api key: expected 'date' to equal 'api_key'

I am doing badge for Introduction to HTTP APIs in Postman , and i am getting a mail to fix this issue, but i dont understand it what does it mean? (Check Request 1: pic of the day api key: expected ‘date’ to equal ‘api_key’)

Hi @pandaonsweets

It means that when the test runs to check you have the right response, it is getting the value of ‘api-key’ instead of the expected value ‘date’.

Check over your request and make sure everything is returning as expected (use the console log to output variables etc to check they are correct).

If you are still stuck, maybe share a screenshot of request 1, both the request and response.

Yeah i first got this error Check Request 1: pic of the day url: expected ‘https://api.nasa.gov/planetary/apod?date=2022-11-30’ to equal ‘https://api.nasa.gov/planetary/apod’ . And i fixed that .

So it’s all working now?

No , I first fixed the first error, but this second one I don’t understand what I need to fix

It looks like it is still seeing the ‘date’ param… Try removing these

I think sometimes unticking them is not enough.

1 Like

now it gave me Check Request 1: Cannot read properties of undefined (reading ‘0’)

Fixed it! i had to remove both, and add manually api_key {{nasa_api_key}} that is not checked

2 Likes

Congrats and thank you for your perseverance @pandaonsweets, we received feedback from different people that the error messages weren’t super helpful, we’ll work to make them better.

1 Like

yeah they are little confusing, glad that @w4dd325 gave me an idea what to try :smiley: We are here to help each other out!

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.