Technical documentation of Geoportal API

  • FR
  • UK

Index / Documentation / Technical documentation

First steps

Obtaining an API Key

The first steps for getting access to the API are :

  • creating a account

    Upon subscription, an email is sent for confirmation. Once confirmed, just log in.

  • creating a contract
    • Enter the title of the contract, the type of the key and the resources you need.
    • Once the contract is created, a key is given with a piece of code using that key with javascript API.
    • Get the information of your contract (including the key) in "My Account".

First Map with Geoportal API

Get the information of your contract (key hashcode and piece of code) in "My Account".

Copy/Paste the piece of code in a new file named (for instance) "maPageApi.html".

HTTP Server

An HTTP Server is needed to serve your first page correctly.

An URL such as http://localhost/maPageApi.html is needed to pass through Geoportal securisation layer and access Resources. The development keys delivered by the api.ign.fr site are only granted to serve pages under the "localhost" domain name.

Several free HTTP servers are available (Apache, lighttpd, ...) and can be used for that purpose.

Once copied in the HTTP server file hierarchy, your page can be seen at http://localhost/path/to/maPageApi.html URL.

Visualisation de la page

Personnal firewalls

Note that an active firewall on your computer can lead to an empty page. In that case you need to authorize the streams coming from geoportal infrastructure and thus *.ign.fr an geoportail.gouv.fr should be authorized in the firewall rules.