Whenever I am trying to generate the token using
curl -X POST -H "Content-Type: application/json" -d '{"username": "email@email.com", "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.
Luiggi
February 8, 2021, 5:42pm
2
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.
Luiggi
February 8, 2021, 6:13pm
4
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.
https://www.metabase.com/learn/developing-applications/advanced-metabase/metabase-api.html
Thanks for all the help. I was using https instead of http due to which I was receiving that error.