API results without API key!

I am not sure if this is a bug or this is how it works.

I tried the below API URL in the browser which obviously showed “{“message”:“API KEY missing from x-api-key header”}” in the window. But when I toggled back and front of the page and it showed me the API results without showing me “{“message”:“API KEY missing from x-api-key header”}”. Refer to the video for more details.

https://deep-index.moralis.io/api/v2/transaction/0xb453852fad82c8d70440951a6a3c50534a49a59fd3b8287bbd10ee38fea7374c?chain=polygon

1 Like

Are you able to reproduce it? I tried to reproduce it and it didn’t work for me.

yes…This is how I recreated. It is working when it is first requested through moralis admin website and after that I tried in the browser. and it is only working the same browser window. I tried the link in different browser and it did not work.

I am guessing this will be the case with all Web3 API’s

This gives me the impression that the browser automatically adds the previous headers used to that specific request from history and that it is why it works. If you look in browser developer view and try to see what request it is made when it works, would you see the complete header with the API key?

This header is when it gave “{“message”:“API KEY missing from x-api-key header”}”


and this one is when it gave the results.

It looks like it took some headers from cache from that image

1 Like