我已获得具有以下范围的OAuth访问令牌: https://www.googleapis.com/auth/userlocation.beacon.registry
使用收到的访问令牌授权Proximity Beacon API,
现在,当我尝试使用google's documentation page中提到的值注册信标时,它会抛出如下错误,
{
error: {
code: 400
message: "Invalid value at 'beacon.advertised_id.id' (TYPE_BYTES), value was "scn3SDrgSD32rSEgv=""
status: "INVALID_ARGUMENT"
details: [1]
0: {
@type: "type.googleapis.com/google.rpc.BadRequest"
fieldViolations: [1]
0: {
field: "beacon.advertised_id.id"
description: "Invalid value at 'beacon.advertised_id.id' (TYPE_BYTES), value was "scn3SDrgSD32rSEgv=""
}-
-
}-
-
}-
}
答案 0 :(得分:0)
传递给寄存器调用的AdverisedId
必须有效 - 对于Eddystone兼容的信标,id
字段必须是直接编码为base64字符串的16字节二进制ID,{{ 1}}字段设置为type
。