1

我正在使用快速API。当我发布(邮递员)时,我收到消息:

{
    "message": "缺少 RapidAPI 应用程序密钥。请访问 https://docs.rapidapi.com/docs/keys 了解如何获取您的 API 应用程序密钥。"
}

问题是,我已经在 POST 中有一个 RapidAPI 应用程序密钥

https://meetupdimashirokovv1.p.rapidapi.com/getEvents?x-rapidapi-host=XXXXXXXXXXXXXXXXXXXXX&x-rapidapi-key=XXXXXXXXXXXXXXXXXXXXX&content-type=application/x-www-form-urlencoded&accessToken=XXXXXXXXXXXXXXXXXXXX

我已经生成并试用了一个新的 RapidAPI 应用程序密钥,但它不起作用。

4

2 回答 2

1

RapidAPI 支持通过查询参数传递 API 密钥。你可以这样做:

https://example.p.rapidapi.com/?rapidapi-key=***************************

而不是这个:

https://example.p.rapidapi.com/?x-rapidapi-key=***************************
于 2021-08-30T09:36:33.590 回答
0

这是因为 x-RapidAPI-host 和 x-RapidAPI-key 不应该在 HTTP 参数中。因为参数指定了资源的可变部分。

当我在参数而不是标题中添加 x-RapidAPI-host 和 x-RapidAPI-key 时,我也遇到了这个问题。

于 2020-04-28T03:38:53.607 回答