I am working on an RND Project to find out the Charging stations around a particular route/geolocation, I am getting credentials not valid error message while trying to access the URL. Meanwhile some of the other services I am able to access with the same API Key but not the EV ones.
How can I access the same using the credentials, Looking forward to valuable feedback from the expert community. Here is what I have tried using Golang.
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
var apikey = "XXXXXXXX"
var latitude = 42.36399
var longitude = -71.05493
var address string
func main() {
url = "https://ev-v2.cc.api.here.com/ev/stations.json?prox=" + fmt.Sprint(latitude) + "," + fmt.Sprint(longitude) + ",5000&connectortype=31&apiKey=" + apikey
res, err := http.Get(url)
if err != nil {
log.Fatalln(err)
}
body, err := ioutil.ReadAll(res.Body)
if err != nil {
log.Fatalln(err)
}
fmt.Println(string(body))
}