Error Code 522

Whenever I am trying to generate the token using

curl -X POST -H "Content-Type: application/json" -d '{"username": "", "password": "mypassword"}' https://url/api/session

I am getting an Error Code 522 stating the connection timed out. Whereas my Metabase is working perfectly. Please help me out.

Hi @kritwish, try using Insomnia or Postman to do API calls. Try those and let us know

Hey @Luiggi I tried with Insomnia but getting the same error code.

ok, so it’s an issue of your network then. please post the troubleshooting info and how you are deploying Metabase to understand the network configuration

@kritwish Copy the cURL command directly from your browser developer Network-tab by right-clicking the request.
The best way to learn the API, is to just use Metabase while having your browser developer Network-tab open and looking at the request, and what data is being send/received.

Thanks for all the help. I was using https instead of http due to which I was receiving that error.