'Error occurred on routing_api __get _route response status code 403

I'd like to compute the travel time between two points. So I use the RoutingApi from herepy library (as reported in the example at https://github.com/abdullahselek/HerePy/blob/master/examples/routing_api.py):

    from herepy import (
    RoutingApi,
    RouteMode,
    MatrixRoutingType,
    MatrixSummaryAttribute,
    RoutingTransportMode,
    RoutingMode,
    RoutingApiReturnField,
    RoutingMetric,
    RoutingApiSpanField,
    AvoidArea,
    AvoidFeature,
    Avoid,
    Truck,
    ShippedHazardousGood,
    TunnelCategory,
    TruckType,
)
routing_api = RoutingApi(api_key="my_key")
response = routing_api.truck_route(
    waypoint_a=[lat_a, lon_a],
    waypoint_b=[lat_b, lon_b],
    modes=[RouteMode.truck, RouteMode.fastest],
)
print(response.as_dict())

Though, even if my api key is valid and "enabled" on the HERE developer platform, I get the following error message:

HEREError: Error occurred on routing_api __get _route response status code 403

Can anyone explain to me why is this happening and how to solve that? Thank you in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source