TVRP API授权

问题描述

我已经成功创建了一个Bearer Token,我想从Tour Planning / VRP API中请求数据。但是,我总是得到以下响应:{“ error”:“ Forbidden”,“ error_description”:“这些凭据未授权访问”}

如果我尝试使用API​​Key而不是Bearer Token发出请求,我不会得到强化。

通过令牌和apikey进行授权对我来说效果很好,我在其他方法中同时使用了它,并且效果很好。但是,这两种授权方法都不起作用:

POST https://vrp.api.here.com/v1/problems 授权:不记名

POST https://vrp.api.here.com/v1/problems?apikey=My_ApiKey

使用此正文:

{
  "plan": {
    "jobs": [
      {
        "id": "myJob","places": {
          "delivery": {
            "location": {"lat": 52.46642,"lng": 13.28124},"times": [["2019-07-04T10:00:00.000Z","2019-07-04T12:00:00.000Z"]],"duration": 180
          }
        },"demand": [1]
      }
    ]
  },"fleet": {
    "types": [
      {
        "id": "myVehicle","profile": "normal_car","costs": {
          "distance": 0.0002,"time": 0.004806,"fixed": 22
        },"shifts": [{
          "start": {
            "time": "2019-07-04T09:00:00Z","location": {"lat": 52.52568,"lng": 13.45345}
          },"end": {
            "time": "2019-07-04T18:00:00Z","lng": 13.45345}
          }
        }],"limits": {
          "maxDistance": 300000,"shiftTime": 28800
        },"capacity": [10],"amount": 1
      }
    ],"profiles": [{
      "name": "normal_car","type": "car","departureTime": "2019-07-04T09:15:00Z"
     }]
  }
}

感谢何塞

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)