Unable to fetch account details using Infura APIs in ropsten

curl https://ropsten.infura.io/v3/<PROJECT_ID> \                                                                            
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":3}'
curl: (6) Could not resolve host: ropsten.infura.io

I am calling above API and getting error as mentioned above. Similar call to mainnet is working fine.

Hello, @pratik! Welcome to the community. This error “cURL error 6: Could not resolve host” looks more related to a hostname resolution of the Infura host rather than an actual issue with the Infura API.
Can you confirm this command works on the machine you’re using to connect to the Infura API?

nslookup ropsten.infura.io

nslookup ropsten.infura.io                                                                                                        
;; connection timed out; no servers could be reached

Looks like it doesn’t. Not sure why?