我正在尝试Google Proximity API
在开发者控制台中注册。我指的是Google Github Link。
当前状态:我已经开始使用Google Github 存储库中提供的示例项目。我使用项目的包名称和使用 keytool 实用程序的 SHA1 创建了 android 密钥和 OAuth 客户端 ID。我正在使用与advertisedId
谷歌文档中提供的相同。
我被困在哪里:每当我尝试在 Google API Explorer 中测试 API 时,它都会抛出错误The API Key and the authentication credential are from different projects.
要求 :
POST https://proximitybeacon.googleapis.com/v1beta1/beacons:register?fields=advertisedId%2Cstatus&key=my_android_api_key
{
"advertisedId":
{
"id": "Fr4Z98nSoW0hgAAAAAAAAg==",
"type": "EDDYSTONE"
},
"status": "ACTIVE"
}
回复 :
400 OK
{
"error":
{
"code": 400,
"message": "The API Key and the authentication credential are from different projects.",
"status": "INVALID_ARGUMENT"
}
}
我已经仔细检查了所有的包名称。它们来自我从Google 存储库下载的同一个项目。
任何线索都会有所帮助。