Authenticating API Requests

Geolocated.io APIs require an API key for all requests. This key identifies the user and authenticates the request. The API key isn't tied to any subscription level, so upgrades or downgrades in the subscription plan do not require you to regenerate the key.

However, the API key is intricately associated with a chosen API server. This means, should there be a need to switch your API server to a new region, your current API key will get invalidated immediately.

Treat your API key as confidential. Ensure its security and refrain from disclosing it. Should you suspect any compromise, immediately regenerate it from the dashboard and update your systems accordingly.

Generate Your API Key

  • If you haven't already, sign up for an account on our platform. If you're an existing user, simply login.
  • From the Dashboard, navigate to the API key management page using the sidebar.
  • You will find an option to generate your unique API Key. During this step, you'll also choose your preferred API server location.
  • Once your key is generated, a unique, 40 characters long key will be displayed.

Structuring Your API Requests

With your API key and server code, you're now equipped to make requests. Construct your endpoint URL by incorporating both pieces of information as follows:

https://{api-server-code}.geolocated.io/{endpoint}?api-key=YOUR_API_KEY

For example, if your chosen API server is located in Singapore, your API request would resemble:

https://sgp-1.geolocated.io/{endpoint}?api-key=YOUR_API_KEY

In this instance, sgp-1 represents the API server situated in Singapore. This server code, alongside the specific endpoint, is made available on your API key page once the key has been generated.