首页 > 解决方案 > 通过 cors-anywhere.herokuapp 调用 Hubspot API 的 429(请求过多)错误

问题描述

我正在尝试使用 React 构建一个 Web 应用程序,为此我正在使用 Hubspot API 来管理我帐户中的联系人。对于 HTTP 请求,我将 JavaScript 库“request-promise”与代理服务器一起使用:https ://cors-anywhere.herokuapp.com/

下面的代码:

do{
    //Here I'm making http request constantly
}while(process);

在大约 100 个 HTTP 请求之后,应用程序向我显示错误:

GET https://cors-anywhere.herokuapp.com/https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=${hapiKey}&count=1000 429(请求太多)

https://cors-anywhere.herokuapp.com/似乎有速率限制问题。有人对此有任何解决方案吗?

标签: reactjsweb-applicationscorsrate-limitinghubspot

解决方案


您是否尝试过在本地运行服务器?https://github.com/Rob--W/cors-anywhere


推荐阅读