title: Departure_time on Google Maps Distance Matrix API (Web Service) WITH Business license
body: <p>I have a Google Maps API for Business license. I still cannot get a response that includes duration time in current traffic. Here is example python code that I'm working with. </p>
  
  <pre><code>#! /usr/bin/env python3
  
  import time
  import urllib.parse
  import base64
  import hmac
  import hashlib
  import urllib.request
  
  
  # Set variables.
  client_id = 'gme-DUMMY'
  crypto_key = 'DUMMY'
  url_base = 'https://maps.googleapis.com/maps/api/distancematrix/json?'
  
  
  # Construct URL. ---------------------------------------------------------------
  query_args = { 'origins':'2097 Honeysuckle Lane Southwest, Atlanta, GA 30311, USA',
                 'destinations':'67 Fitzgerald Street Southeast, Atlanta, GA 30312, USA',
                 'client':client_id,
                 'departure_time':time.time()  # +2*60 or +5*60 does nothing
           }
  encoded_args = urllib.parse.urlencode(query_args)
  url = url_base + encoded_args
  
  
  # Get encoded_signature. -------------------------------------------------------
  # Remove the 'https://' from url.
  url_parsed = urllib.parse.urlparse(url)
  url_to_sign = url_parsed.path + "?" + url_parsed.query
  
  # Decode crypto_key into its binary format.
  decoded_key = base64.urlsafe_b64decode(crypto_key)
  
  # Create a signature using HMAC SHA1. This signature will be binary.
  signature = hmac.new(decoded_key, url_to_sign.encode('utf-8'), hashlib.sha1)
  
  # Encode the binary signature into base64 for use within a URL.
  encoded_signature = base64.urlsafe_b64encode(signature.digest()).decode("utf-8")
  
  
  # Append encoded_signature to url. ---------------------------------------------
  encoded_url = url + '&amp;signature=' + encoded_signature
  
  
  # Send query. ------------------------------------------------------------------
  f = urllib.request.urlopen(encoded_url)
  print(f.read().decode('utf-8'))
  </code></pre>
  
  <p>Additional notes: </p>
  
  <ul>
  <li><p>I've tried adding two and five minutes to the <code>departure_time</code> as well, but it had no effect. (The documentation just notes that the <code>departure_time</code> should be within a few minutes from the current time.)</p></li>
  <li><p>I've verified that the code is working and is responding with the same duration that maps.google.com lists as the "duration without traffic."</p></li>
  <li><p>I've dug around StackOverflow for several hours now trying to find a question/answer where the person actually had a business license. I couldn't locate one. Please point one out if it exists. </p></li>
  <li><p>The above code follows <a href="https://developers.google.com/maps/documentation/business/webservices/auth" rel="nofollow">Google's example</a>. It is ported to Python 3.x though.</p></li>
  </ul>