【问题标题】:Missing RapidAPI application key (not missing)缺少 RapidAPI 应用程序密钥(不缺少)
【发布时间】:2020-03-19 10:56:38
【问题描述】:

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

{ "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 应用程序密钥,但它不起作用。

【问题讨论】:

  • 我可以直接访问 Meetup API。所以错误发生在 RapidAPI。

标签: javascript typescript post postman rapidapi


【解决方案1】:

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

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

而不是这个:

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

【讨论】:

    【解决方案2】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-03-09
      • 1970-01-01
      • 2016-08-29
      • 1970-01-01
      • 2018-01-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多