We are in the process of creating a process to validate the accuracy of an addre

We are in the process of creating a process to validate the accuracy of an address and retrieve latitude and longitude values. We are attempting to use the Google Maps Geocoding API for this purpose. We are a Google Maps for Business API customer, which requires that each request to the Maps API contain a client and signature parameter. The client value is static, but the signature is a dynamically generated, URL safe Base64 encoded value . I've already created the expression that generates the signature but am having issues when sending the value as a parameter in both the httpquery expression and http query smart service. Has anyone successfully integrated with the Google Maps Geocoding API, specifically as a Google Maps for Business customer? If so, I would like to hear about your experience.

OriginalPostID-152212

OriginalPostID-152212

  Discussion posts and replies are publicly visible

Parents
  • When I attempt to use a!httpQuery, I get the error "Illegal character in query at index 165" (index will change based on URL length, but it's always the last character). If I use httpget, which is an expression from the Web And XML Extensions shared component, the results come back just fine (see attached). For reference, here's the GM_generateGeocodeURL rule content:
    =with(
    local!address: join({route.routePointAddr, route.routePointCity, route.routePointState, route.routePointZip}, ","),
    local!safe_address: substitute(local!address, " ", "+"),
    local!initial_url: cons!GOOGLE_MAPS_GEOCODE_URL_XML & "?address=" & local!safe_address & "&client=" & cons!GOOGLE_MAPS_CLIENT_ID,
    local!signature: generategooglemapssignature(
    url: local!initial_url,
    secure_credential_store_key: "google.maps.for.business",
    secure_credential_store_attribute_key: "crytpo.key",
    algorithm_name: "HmacSHA1"
    ),
    local!initial_url & "&signature=" & local!signature
    )

Reply
  • When I attempt to use a!httpQuery, I get the error "Illegal character in query at index 165" (index will change based on URL length, but it's always the last character). If I use httpget, which is an expression from the Web And XML Extensions shared component, the results come back just fine (see attached). For reference, here's the GM_generateGeocodeURL rule content:
    =with(
    local!address: join({route.routePointAddr, route.routePointCity, route.routePointState, route.routePointZip}, ","),
    local!safe_address: substitute(local!address, " ", "+"),
    local!initial_url: cons!GOOGLE_MAPS_GEOCODE_URL_XML & "?address=" & local!safe_address & "&client=" & cons!GOOGLE_MAPS_CLIENT_ID,
    local!signature: generategooglemapssignature(
    url: local!initial_url,
    secure_credential_store_key: "google.maps.for.business",
    secure_credential_store_attribute_key: "crytpo.key",
    algorithm_name: "HmacSHA1"
    ),
    local!initial_url & "&signature=" & local!signature
    )

Children
No Data