【问题标题】:Using World Weather Online使用在线世界天气
【发布时间】:2017-04-03 19:16:50
【问题描述】:

我正在尝试访问 api 的 Marine 库,World Weather Online

我已经注册并拥有一个 api 密钥,尽管文档没有帮助配置访问 api 所需的 url。

我试过这个网址- http://api.worldweatheronline.com/free/v2/weather.ashx?key=XXXXXXXXXXXXXXXXXXXXX&q=48.85,2.35&format=json

并且正在收到回复-

{ "data": { "error": [ {"msg": "API 密钥无权访问资源。" } ] }}

这不是替换我的密钥 = XXXXXXXXXXXXXXXXXXXXX

任何想法

【问题讨论】:

  • 可能是错误的 api 密钥?
  • 你知道一个可以用正确的键@SergioTulentsev 工作的网址

标签: json node.js api url


【解决方案1】:

啊,我想我知道了。当您注册时,他们会免费试用高级 api 访问权限。而且,显然,他们给你的 api 密钥,无论出于何种原因,它都不适用于免费端点。不过,它适用于高级产品。

http://api.worldweatheronline.com/premium/v1/weather.ashx?key=xxxxxxxxxxxxxxxx&q=London&format=json&num_of_days=5

注意:对于premium,请使用v1

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-17
    相关资源
    最近更新 更多