Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

API Key authentication allows you to consume Nearmap imagery in an application without having to provide your Nearmap username and password as authentication credentials. Instead you include an API Key – a unique long string associated with a particular user on your Nearmap account – and then include that API Key in all requests to Nearmap endpoints, typically by appending it to a URL.

Info

In addition to this guide, you can view our Service Portal tutorial video on How to Generate API Keys.

You manage API Keys using a simple user interface within your Nearmap profile; no API call is needed to create an API Key. An API Key is valid until you delete it; you do not have to regularly refresh it.

...

  1. Log in to Nearmap at https://admin.nearmap.com/welcome as a user who is a Nearmap administrator.

  2. Click the API Access tab at the top of the screen, then the API Applications. If you do not see that the tab, it is likely that you are not a Nearmap administrator.

  3. Click the Create New button.


  4. Enter an Application Name. This can be any string of characters. A good name would describe the integration that you intend to have with Nearmap imagery.

  5. You can optionally specify restrictions on which IP addresses or web sites can load Nearmap imagery via an API Key associated with this API Application:

    • IP restrictions: only IP addresses in the ranges you specify will be able to load Nearmap imagery. CIDR addresses are accepted. For example, 192.168.34.0/24.
      There is a character limit of 1 to 100 characters for our API restriction.

    • Referrer restrictions: only web pages that have been downloaded from only URLs that begin with one of the web addresses you specify will be able to load specified referrer prefixes are allowed access to Nearmap imagery. This is based on web browser support for the HTTP referrer header field. 

      Enter here your referrer address/addresses, in a comma-separated list. A referrer address can contain sub-directories. For example, https://mywebsite.com/myapplications/app1.
      Access is allowed when one of the specified referrer prefixes matches the beginning of the URL that is shown in the web browser.
      The API Referrer Restriction do not automatically include an https or http suffix to the restriction, you will need to specifically include the full URL
      You must explicitly include https:// or http:// at the start of a Referrer Restrictions URL, the restriction will not work if this is missing. 

      Note: There is a character limit of 1 to 100 characters for the referrer restrictions.


    If the purpose of these restrictions is not clear to you, we recommend that you do not enter any restrictions.

  6. Click the Save button.

Your API Application should be displayed on the screen. Each user on your Nearmap account can now create an API Key for that API Application.

As a Nearmap administrator, you can also use the API Access tab to:

  • Manage your existing API applications
  • View which users have created an API Key for an API application
  • Create and manage your own API Keys (using the same interface as non-admin users)

...

  1. Log in to Nearmap at https://admin.nearmap.com/welcome.

  2. If you are a normal user, click the My API Keys button. If on the other hand you are an administrator, select API Access from the top menu, and click the My API Keys link tab.

  3. Choose an application from the drop-down list.

    If there is no application in the drop-down list, or the API Application you want is not there, contact your organisation's Nearmap administrator.

  4. Click Create API Key.

The API Key is now created – it is the long string of characters in the API Key column. You can use it in your integrations, as explained in Using an API Key in Nearmap Integrations.

Deleting an API Key

If you no longer need an existing API Key, you can log in to Nearmap to delete it.

  1. Log in to Nearmap at https://admin.nearmap.com/welcome.

  2. If you are a normal user, click the My API Keys button. If on the other hand you are an administrator, select API Access from the top menu, and click the My API Keys link.

  3. Find your API Key and click the Delete icon.

More About API Key

...

Authentication in Nearmap

Page Tree
rootAPI Key Authentication

...