[SOLVED] "Master Key Is Required" when its already provided

When calling aggregate query, it keeps asking for a master key, even though its already provided.
Screenshot_18

For connecting I use react-moralis MoralisProvider
Screenshot_17
and even start Moralis the second time with moralis-v1
Screenshot_19

Everything works well when querying data that doesn’t require a MasterKey.
Screenshot_20

Using NextJS

Try checking if Moralis.masterKey is null. If it is null you can can also add it like this.

Moralis.masterKey = "masterkey"

And master key is not meant to use on client side.

1 Like

Problem solved, thanks.

1 Like