[SOLVED] "Unable to connect to the Parse API" on NodeJS

I’ve attempted to run Moralis on NodeJS but I keep getting this error:

ParseError: XMLHttpRequest failed: "Unable to connect to the Parse API"
    at handleError (C:\Users\38976\node_modules\moralis\lib\node\RESTController.js:436:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  code: 100

What is your code? Usually this error means that you didn’t set Application ID and SERVER_URL.

const Moralis = require(‘moralis/node’);


Moralis.serverURL = ‘ServerURL’;

Both are set but can’t get it to initialize. This APPID and ServerURL work on the web version but not on nodejs

This works fine for me:

x = async () => {
    const  Moralis = require('moralis/node')
    Moralis.serverURL = "SERVER_URL"
    const options = {address: "0xe9e7cea3dedca5984780bafc599bd69add087d56", chain: "bsc"}
    tokenInfo = await Moralis.Web3API.token.getTokenPrice(options)


Just tried this but still the same error

what you get if you run this:

const Moralis = require('moralis/node')

Found the issue. The connection was failing because I had proxy running on the background.

I’m having the same problem as Konflict
I have double checked that I have well indicated my Server URL, APP ID , Masterkey, API URL and API key in the index.js file as well as config.js.
I still get “Error [ERR_FR_MAX_BODY_LENGTH_EXCEEDED]: Request body larger than maxBodyLength limit”

as well as " ParseError: XMLHttpRequest failed: “Unable to connect to the Parse API”.
and Json metadata does not get generated.

Any chance you would know what could cause those errors, your help would be greatly appreciated .
Thank you so much in advance :slight_smile:

hi I have checked all the enviornment variables



API_KEY=“myapikey in here”


MASTER_KEY=“my master key in here”
how ever i get this error

Error: Request failed with status code 404
at createError (C:\moralis-mutant-nftengine\moralis-mutants-nft-engine\node_modules\axios\lib\core\createError.js:16:15)
at settle (C:\moralis-mutant-nftengine\moralis-mutants-nft-engine\node_modules\axios\lib\core\settle.js:17:12)
at IncomingMessage.handleStreamEnd (C:\moralis-mutant-nftengine\moralis-mutants-nft-engine\node_modules\axios\lib\adapters\http.js:293:11)
at IncomingMessage.emit (node:events:539:35)
at endReadableNT (node:internal/streams/readable:1345:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false

maybe you don’t have to add " here?

1 Like

thank you! here was the error
i was using the wrong API_url
i have change it to

1 Like

@cryptokid having the same issue here, i keep getting this error (screenshot attached)

Code is the following

import "../styles/globals.css";
import type { AppProps } from "next/app";
import { MoralisProvider } from "react-moralis";
import { MoralisDappProvider } from "../src/providers/MoralisDappProvider/MoralisDappProvider";

const APP_ID = "9mCJLhebtIbRti9XL8oVscBPIlCL6EBeFbrkoL7E";
const SERVER_URL = "https://xvebvq4ftwkf.usemoralis.com:2053/server";

function Example({ Component, pageProps }: AppProps) {
  const isServerInfo = APP_ID && SERVER_URL ? true : false;
  if (!APP_ID || !SERVER_URL)
    throw new Error(
      "Missing Moralis Application ID and or SERVER URL. Make sure to set your .env file."
  if (isServerInfo)
    return (
          <Component isServerInfo {...pageProps} />
export default Example;

appreciate your help!

this is all the code that you have?

1 Like

no i have a few pages and Components in a next app.

This is index.tsx:

import type { NextPage } from "next";
import Head from "next/head";
import { useMoralis } from "react-moralis";
import Header from "../src/components/Header/Header";
import Login from "../src/components/Login/Login";
const Home: NextPage = () => {
  const { isAuthenticated } = useMoralis();

  if (!isAuthenticated) return <Login />;
  return (
    <div className="flex min-h-screen flex-col">
        <link rel="icon" href="/favicon.ico" />
      <Header />

export default Home;

all of a sudden it works again!

1 Like