Google Directions API - Request Denied

Discussion in 'Google API' started by kbsudhir, Jan 2, 2013.

  1. #1
    Hi All,

    A Very Happy New Year.

    I am trying develop an excel based tool to get the distance between two location from Google. Both Start & End destination address is available in the excel file.
    I am using XML to get the job done. Below code is to send the request to Google Maps.

    xmlRequest.Open "GET", "http://maps.googleapis.com/maps/api/directions/xml?origin=" & SourceAddress & "destination" & "=" & DestinationAddress & "sensor=false", False
    Code (markup):


    Now, SourceAddress & DestinationAddress is getting populated from the excel sheet. Also if there is space between the words in the address, I am replacing it with "+".

    But XML response which i am receiving is "Request_Denied".

    It seems I am making some mistake in the above code snippet.

    Requesting your guidance to get is resolved.

    Regards
    Sudhir
     
    kbsudhir, Jan 2, 2013 IP
  2. kbsudhir

    kbsudhir Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi All,

    Below is the right syntax for XML request.
    :)

    
    xmlRequest.Open "GET", "http://maps.googleapis.com/maps/api/directions/xml?origin=" & SourceAddress & "&" & "destination" & "=" & DestinationAddress & "&" & "sensor=false", False
    
    Code (markup):
    Regards
    Sudhir
     
    kbsudhir, Jan 11, 2013 IP
  3. NureA

    NureA Greenhorn

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    6
    #3
    Yep this happened to me, I just gave up
     
    NureA, Sep 21, 2013 IP