Google Map JavaScript API from server page : I hava a problem about Google Map JavaScript API access.

I can access Google Maps API with Javascript class, google.maps.DirectionsService and google.maps.Geocoder, from my local html file (C:\path\to\google.html).

script tag is:

    <script async defer type="text/javascript"
      src="https://maps.googleapis.com/maps/api/js?key=MY_API_KEY&callback=initialize"></script>

but I can't do it with same source on localhost server(http://localhost:8080/static/path/to/google.html).

The console.log() message is:

    Directions Service: This API project is not authorized to use this API.  For more information on authentication and Google Maps JavaScript API services please see: https://developers.google.com/maps/documentation/javascript/get-api-key

How can I access there?