When getting started with the ZipCodeAPI many users want to test against their local server and immediately hit a snag and we get a question similar to the following

I am trying to test using this application to see if it will suffice for our needs. I have created an application, but it is only local. When I activate the client side API key it requests a domain, what should be used for local host?

I am making distance api call from javascript but getting “Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.zipcodeapi.com/rest/[KEY]/distance.json/06520/06534/mile. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).”

I have a question regarding my development environment, is it possible to allow adding source http://locahost:59999 (or some other port number) to the CORS list to allow me to test in development environment

This has always been related to CORS Issue. CORS is cross-origin resource sharing and helps control what sources are allowed to access resources in an application.

  • Login @ https://www.zipcodeapi.com/AppManagement

  • Go to ClientSide Key Setup and enter Application Key and Email Client Side Access Setup

  • Enter the domains allowed access, including localhost for local testing Client Side Access Localhost

  • Save and you will have a client side key you can use for your production domain and localhost. Client Side Access Localhost

The key will always be available on your “Client Side Access Setup” page.

If you have any issues reach out to info @ redline13.com