How to programmatically reset local chain

Is there is a way to programmatically reset the local chain rather than going through the UI?

It is possible to do that, it isn’t mentioned in documentation. You have to make a http request to a specific path in the server with the master key as parameter.

POST Server:2087/reset_local_chain

“moralisMasterKey”: “master key here"

So I am posting via Postman with the URL

and the body params


I am getting the response:


Any suggestions?

If I send the same request to URL

with the same body params I get the response


I am able to do it via a curl request.

curl '' \
              -H 'Accept: application/json, text/plain, */*' \
              -H 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
              -H 'Connection: keep-alive' \
              -H 'Content-Type: application/json' \
              -H 'Origin:' \
              -H 'Referer:' \
              -H 'Sec-Fetch-Dest: empty' \
              -H 'Sec-Fetch-Mode: cors' \
              -H 'Sec-Fetch-Site: cross-site' \
              -H 'Sec-GPC: 1' \
              -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.114 Safari/537.36' \
              --data-raw '{"moralisMasterKey":"masterkey-here"}' \
1 Like