4

Currently I have registered beacons to the Google Proximity Beacon API. They're Eddystone beacons. I can also retrieve the beacon's data and add attachment (I think). The problem I have is retrieving those attachments.

I used the following website to retrieve the attachments, but I get a 404 error in return. https://labs.ribot.co.uk/exploring-google-eddystone-with-the-proximity-beacon-api-bc9256c97e05#.rndagn22e

<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
<p><b>404.</b> <ins>That’s an error.</ins>
<p>The requested URL <code>/v1beta/beaconName/attachments/</code> was not found on this server.  
<ins>That’s all we know.</ins>

I used a GET method to retrieve the data. My application sends the request with a token using a Volley JsonObjectRequest. This is the URL I am using:

GET https://proximitybeacon.googleapis.com/v1beta1/beaconName/attachments

If I use the GET method to retrieve the beacons I do also not recieve the attachments (I can't find it anywhere if it should return the attachments as well).

Is it possible that I use the wrong URL? Has anyone else come across the same problem?

EDIT: I updated my url with the query parameter required:

https://proximitybeacon.googleapis.com/v1beta/beaconName/attachments?namespacedType=*/*

In the request headers I put the token I retrieved from a previous request (oAuth2.0). There's no API key involved here. Every other method for updating, registering and retrieving beacons work, except for retrieving attachments.

SOLVED There was a 1 missing in the URL

https://proximitybeacon.googleapis.com/v1beta1/beaconName/attachments?namespacedType=*/*
Melli
  • 43
  • 8
  • It's hard to come up with an answer without seeing the code. What exact response do you get from `GET https://proximitybeacon.googleapis.com/v1beta1/beaconName/attachments`? And are you using an API key? – davidgyoung Apr 07 '16 at 12:16
  • I am using a JsonObjectRequest. In the header of the request I put a token I retrieved from GoogleAuthUtil.getToken() method. The response I receive from GET https://proximitybeacon.googleapis.com/v1beta1/beaconName/attachments is the 404 error I posted in my question. I am not using an API key (that shouldn't be the problem since the other calls work) – Melli Apr 07 '16 at 12:46
  • is your beacon name really "beaconName"? – davidgyoung Apr 07 '16 at 17:21
  • No, it has a beacons/N!beaconid name – Melli Apr 08 '16 at 06:07

1 Answers1

0
https://proximitybeacon.googleapis.com/v1beta/beaconName/attachments?namespacedType=*/*

The above URL is missing a 1 after v1beta, it's supposed to be v1beta1 as written in de URL below.

https://proximitybeacon.googleapis.com/v1beta1/beaconName/attachments?namespacedType=*/*
Melli
  • 43
  • 8