5 Replies Latest reply on Mar 26, 2019 6:42 PM by Peter Fakan

    How to use a WMS server which requires an API key

    Henrik Ramm-Schmidt



      We are struggling with understanding how the Tableau custom WMS configuration works in the .tms-file.


      We have a created a WMS service which combines OpenStreetMap background maps from our own tile server, with weather data from our weather server. Reason for this is that we wanted to make a WMS which has multiple different types of layers in the same map service served from a single WMS and so that we can have a background map with various other map layers, such as weather data.



      Since it is good practice to secure your WMS, we have implemented an api-key for the service which runs over https. However, for some reason we do not seem to be able to figure out how the .tms-file should be written so that the APi-key gets passed to our server.


      Our WMS URL is formatted as follows: https://map.server.com/service?   and we need to pass the API key as an apikey-parameter &apikey=[the_api_key]


      We have formatted our tms file like this, but with this it didn't seem to work and we receive an error in Tableau.


      <?xml version="1.0" encoding="utf-8"?>

      <mapsource inline="true" version="8.1">

           <connection class="OGC-WMS" port='443' server='map.server.com' service='https' url-format='/service?&amp;apikey={K}' username='[our_api_key]' description='Single source WMS service'/>


                <layer display-name='Base' name='base' show-ui='false' type='features' request-string='/'/>




      Question: Is there available somewhere a document which describes in detail how the .tms-file should be structured and which types of xml-tags it accepts? We would be interested to understand the mapping capabilities in more detail, but so far we have failed to find the answer here on the forums.


      Kind regards, Henrik / Finland