Stumped with API working in browser but not postman

I have this API endpoint: https://server.bloodmitra.org/dashboard/api/donors?name=kaitlyn.

If I try this from my browser I get json response:

But when I try it from Postman I get this error:

I’ve tried looking up issues, logging and logging out to clear local data but I just can’t figure out what the issue is.

Hi @funkiepie,

Cool name by the way :slight_smile:

You may need to enable the proxy in the Postman setting.

Cheers

Whenever you get the ENOTFOUND error for an address there are a few things to check.

Always check the different applications you are using for different configurations of a proxy, as @cruxto mentioned, as this can easily be forgotten. This happens more often in corporate environments where they deploy http proxies or Zero Trust Network appliances which they can push updates (via Group Policies/BigFix/etc) to common browsers to automatically use the proxy information.

If you are not using a proxy and don’t believe this to be the case then here are a few commands for the different operating systems you can use to find out more information on where the issue persists.

Check your DNS via command line prompt/shell:

nslookup server.bloodmitra.org
If nslookup is unavailable you can also do a dig command.
dig server.bloodmitra.org
If that is still unavailable you can issue a ping command to ensure connectivity
ping server.bloodmitra.org

If any of these commands fail to find the server whilist your browser is still working then you may want to flush your dns

Windows

ipconfig /flushdns

Linux

(This assumes systemd based configuration)
sudo systemd-resolve --flush-caches

Mac

sudo killall -HUP mDNSResponder

Check Hosts Files

There are times that developers (or even tooling) modify the hosts file which can override the lookup entries for DNS. Browsers/Applications can be configured to potentially ignore this setting.

Windows

(Assuming C:\ is your install path for Windows)
Navigate a file explorer to C:\Windows\System32\drivers\etc\hosts and open it with notepad.

Linux/Mac

cat /etc/hosts

Check Firewalls/Security Software

Other security software like firewalls or endpoint security may be blocking Postman from making the call. You will have to consult your system administrator or dig into your setup specifically to see if this is the issue.

Test from another Network

If you are able to test from another network (e.g. mobile hotspot) using Postman it would quickly eliminate some software configurations/concerns if the different network works without an issue as it would isolate the issue to specifically the network that fails instead of the many possible software configurations.

(I have opened this URL in my browser and made a call via Postman - both returned the same message about an Authorization header is missing so its not a server issue and will be related to your own machine/network that you are working on)