【发布时间】:2020-05-01 22:30:57
【问题描述】:
虽然这个问题被问了好几次,但我担心的是为什么在完全相同(复制粘贴)的情况下会出现包名和指纹不匹配的错误。
数据(视频和统计数据)对于针对 youtube-v3-api 的非限制性 google API 密钥正在正确获取,但由于我在 google 控制台上限制密钥(在 API 请求的标头中传递包名称和指纹)数据变得不可用。以下是api响应声明
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "ipRefererBlocked",
"message": "The Android package name and signing-certificate fingerprint,
"Package_name" and
"Finger_Print", do not match the app restrictions
configured on your API key. Please use the API Console to update your key restrictions.",
"extendedHelp": "Project_Link_Google_Console"
}
],
"code": 403,
"message": "The Android package name and signing-certificate fingerprint,
"Package_name" and
"Finger_Print", do not match the app restrictions
configured on your API key. Please use the API Console to update your key restrictions."
}
}
它说“包名称和指纹与您的 API 密钥上配置的应用程序限制不匹配”,尽管这些是从代码复制粘贴到控制台的。
【问题讨论】: