测试了下,最直接的原因应该是 这个 api 无法连通 国内。
用科学上网工具后,才能得到报错结果:
{
"cod":401,
"message": "Invalid API key.
Please see https://openweathermap.org/faq#error401 for more info."
}
去对应的网址看了下:
You can get the error 401 in the following cases:
- You did not specify your API key in API request.
- Your API key is not activated yet. Within the next couple of hours, it will be activated and ready to use.
- You are using wrong API key in API request. Please, check your right API key in personal account.
- You are using a Free subscription and try requesting data available in other subscriptions . For example, 16 days/daily forecast API, any historical weather data, Weather maps 2.0, etc). Please, check your subscription in your personal account.
很显然不是上述的原因,虽然其中第二条有日本的用户反应遇到过——API key 一开始不生效,过了一段时间自动又生效了。
如果有更准确的使用报告,请各位站长和技术人员反馈告知。