0

can anyone help me please when I running this piece of code which is a tutorial for the mapmatcher API from mapbox it returning 401 and in the tutorial it should return 200 I did as the tutorial said exactly so I don't know what is the problem ?

from mapbox import MapMatcher
service = MapMatcher()
line = {
    "type": "Feature",
    "properties": {
        "coordTimes": [
            "2015-04-21T06:00:00Z",
            "2015-04-21T06:00:05Z",
            "2015-04-21T06:00:10Z",
            "2015-04-21T06:00:15Z",
            "2015-04-21T06:00:20Z"]},
    "geometry": {
        "type": "LineString",
        "coordinates": [
            [13.418946862220764, 52.50055852688439],
            [13.419011235237122, 52.50113000479732],
            [13.419756889343262, 52.50171780290061],
            [13.419885635375975, 52.50237416816131],
            [13.420631289482117, 52.50294888790448]]}}
response = service.match(line, profile='mapbox.driving')
response.status_code
  • 1
    Please provide a link to the tutorial and the URL you are accessing. And have you set your [access token](https://github.com/mapbox/mapbox-sdk-py/blob/master/docs/access_tokens.md)? – Ken Y-N Jan 16 '20 at 06:43
  • this is the link of the tutorial https://github.com/mapbox/mapbox-sdk-py/blob/master/docs/mapmatching.md – Sarah Eldawody Jan 17 '20 at 16:10

0 Answers0