getTokenIdMetadata returning 141 Invalid Server Auth


A few days ago, I was running into an issue with being rate limited when running this function:

await Moralis.Web3API.token.getTokenIdMetadata(options);

  • I added some rate limiting code in my Front-end and also added some rate-limiting code in my Cloud Functions and that solved the problem.

Now today I’m noticing a new error sporadically, when I run the same function as above:

{"code":141,"error":"Invalid Server Auth"}

Is there some kind of authentication I’m required to do in order to run API calls against Moralis?

Thanks in advance!

can you paste your server subdomain/url?

@cryptokid absolutely. The server is - It’s really interesting it’s only happening for some of the requests, but not all.

I can see those error in that server log, I don’t know how to reproduce it now

Hmmm that’s interesting. I appreciate you looking at this. I also sometimes get this error from the same way of accessing that function:

{code: 141, error: "Web3 API error while calling /nft/:address/:token_id"}

Is there a possible workaround for this?

Could updating my server to the latest version work?

I don’t know if updating to latest version would help

I appreciate the response. Merry Christmas to you :slight_smile:

Now do you think calling the API directly without using the SDK would matter at all? I’m not sure if there’s versioning issues that could mess up the REST call on the server side because I noticed the SDK version number gets sent when sending VIA the SDK

I think that if you call the api directly you would not get the error with authentication.

did you manage to call web3api directly meanwhile?