【问题标题】:Failed to load resource: the server responded with a status of 403 (), youTube API with Netlify加载资源失败:服务器响应状态为 403(),youtube API with Netlify
【发布时间】:2020-11-10 05:53:53
【问题描述】:

我正在使用 te youtube API 进行 React Youtube 克隆,并且它在本地服务器上运行良好,但是当我使用 Netlify 托管项目时出现此错误:

Failed to load resource: the server responded with a status of 403 ()
createError.js:16 Uncaught (in promise) Error: Request failed with status code 403
    at e.exports (createError.js:16)
    at e.exports (settle.js:17)
    at XMLHttpRequest.p.onreadystatechange (xhr.js:61)

我也尝试使用 Firebase 托管,没有错误但数据永远不会加载..

【问题讨论】:

    标签: reactjs youtube-api netlify


    【解决方案1】:

    您可以尝试以下方法: 查看授权指南以了解如何使用 Youtube API。它可能允许使用 localhost,但需要您使用凭据注册 Web 应用程序。

    Authorization Docs

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-11-28
      • 1970-01-01
      • 1970-01-01
      • 2022-06-11
      • 2017-12-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多