首页 > 解决方案 > 使用 Google Books API 时收到 403 响应错误代码

问题描述

所以我正在使用Google Books API,我的代码如下所示:

 axios
  .get(
    "https://www.googleapis.com/books/v1/volumes?q=" +
      this.props.categoryName +
      "&key=myKey"
  )
  .then((response) => {
    console.log(response);
  })
  .catch((err) => console.error(err));

在使用此 API 时,我收到以下错误:

请求失败错误

我在网上做了一些研究,据说当我们从给定的 API 密钥发出太多请求时会出现这个错误,但到目前为止我只发出了 5 个请求,但它仍然抛出这个错误。

标签: reactjshttp-status-code-403google-books-api

解决方案



推荐阅读