0

I am running an angular app using here maps api-keys for authentication. But I'm getting {status: 401, message: "Invalid app_id app_code combination"} when I'm not using app_id nor app_code at all.

This error occurs when I use the search api. Below is an example of how my search works:

 public places(query: string) {  
         this.map.removeObjects(this.map.getObjects());  
         this.search.request({ "q": query, "at": this.lat + "," + this.lng }, {}, data => {  
           for (let i = 0; i < data.results.items.length; i++) {  
             this.dropMarker({ "lat": data.results.items[i].position[0], "lng": data.results.items[i].position[1] }, data.results.items[i]);  
             if (i == 0)  
               this.map.setCenter({ lat: data.results.items[i].position[0], lng: data.results.items[i].position[1] })  
           }  
         }, 
         error => {  
           console.error("hello"+ error);  
         });  
       }  
Marvelous Ikechi
  • 2,031
  • 2
  • 15
  • 26

0 Answers0