对youtube API的简单REST GET请求返回错误

对youtube API的简单REST GET请求返回错误,rest,youtube-api,Rest,Youtube Api,我对使用各种服务的RESTAPI非常陌生。 我正在youtube上搜索视频 在GCP中,我启用了Youtube数据API,生成了密钥并设置了引用限制。 在Postman中(或在浏览器中-结果相同),我使用URL调用GET方法(从API资源管理器获取) 并将具有正确值的referer字段添加到标题中 这是该服务的答案: { "error": { "errors": [ { "domain": "usageLimits"

我对使用各种服务的RESTAPI非常陌生。
我正在youtube上搜索视频

在GCP中,我启用了Youtube数据API,生成了密钥并设置了引用限制。 在Postman中(或在浏览器中-结果相同),我使用URL调用GET方法(从API资源管理器获取)

并将具有正确值的referer字段添加到标题中

这是该服务的答案:

{
    "error": {
        "errors": [
            {
                "domain": "usageLimits",
                "reason": "ipRefererBlocked",
                "message": "The referrer ReferreValue does not match the referrer restrictions configured on your API key. Please use the API Console to update your key restrictions.",
                "extendedHelp": "https://console.developers.google.com/apis/credentials?project=589726014278"
            }
        ],
        "code": 403,
        "message": "The referrer ReferreValue does not match the referrer restrictions configured on your API key. Please use the API Console to update your key restrictions."
    }
}
问题:
1.我的项目id不是589726014278
2.referer值是OK的,当然不是针对未知的项目id

问题:
我怎样才能让它工作?我想让它尽可能简单;没有任何东西。可能吗?

尝试重新创建Youtube api密钥,并根据讨论的答案将refere值设置为null


重新生成一个键有帮助。我可以使用新的关键,即使设置参考现在。
{
    "error": {
        "errors": [
            {
                "domain": "usageLimits",
                "reason": "ipRefererBlocked",
                "message": "The referrer ReferreValue does not match the referrer restrictions configured on your API key. Please use the API Console to update your key restrictions.",
                "extendedHelp": "https://console.developers.google.com/apis/credentials?project=589726014278"
            }
        ],
        "code": 403,
        "message": "The referrer ReferreValue does not match the referrer restrictions configured on your API key. Please use the API Console to update your key restrictions."
    }
}