I have obtained OAuth Access token with th following scope: https://www.googleapis.com/auth/userlocation.beacon.registry
And using the access token received for authorizing Proximity Beacon APIs,
Now when I tried to register a beacon with the value mentioned at google's documentation page, It throws an error as follows,
{
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=""
}-
-
}-
-
}-
}
The AdverisedId
you pass to the register call must be valid — for Eddystone compatible beacons, the id
field must be a 16-byte binary ID directly encoded as a base64 string, with the type
field set to "EDDYSTONE"
.