[SOLVED] Data: { message: 'API KEY missing from x-api-key header' }

Hey! I’ve looked through a handful of the answers to this problem and nothing has worked yet.

Error:

  • data: { message: ‘API KEY missing from x-api-key header’ }

Code:

https://deep-index.moralis.io/api/v2/0x7d22aF94809C95324c81CbBcFd7C26C9d4B665d8/nft/0x08D7C0242953446436F34b4C78Fe9da38c73668d?chain=eth&format=decimal;

Everything looks ok, can we see your fetchRequest function? Try making a regular test call with fetch and those headers.

Here it is. Thanks for looking into this!

For some reason it works in Postman

Here’s the terminal readout, https://docs.google.com/document/d/10ngIhulrv6wf1yzeYG8teemOHTZtfqTmPAx2BJx8VSs/edit?usp=sharing

you can look in your browser network tab to see if it is really seeing that header info with that fetch

1 Like

Okay. I don’t see the API Key … key anywhere in the response or request headers. Which of those should I be looking at, response or request?

Could this be a problem with how I’m sending the information to axios?

it seems to be a problem on how axios is used, maybe is not sending those headers, maybe the syntax is different to set the headers

1 Like

SOLVED:
@cryptokid was close

Hats off to @EncodedInsight

The “H” in headers was capital. Axios needs it lowercased.

1 Like