Cannot retrieve gateway data from account server

I have a gateway in V3 configured and try to retrieve gateway information from the account server.
For that I use the URL: https://account.thethingsnetwork.org/api/v2/gateways/rfsee-dev-gateway-01 with the authorisation key as provided for the gateway. The key has all priviledges.

When I request data for this gateway I get :

{
    "code": 404,
    "error": "Gateway with ID rfsee-dev-gateway-01 does not exist"
}

When I replace the gateway ID for another gateway I get:

{
    "code": 401,
    "error": "Invalid key for gateway"
}

This is correct as I did not provide the right key.

There is no relation between gateways being on- or offline. It is simply that I can retrieve data from some gateways and from a number of gateways none. The behaviour of the TTN API is inconsistent.

I have used documentation from here: https://www.thethingsnetwork.org/docs/network/account/api/ and from @kersing port of balena: ttn-resin-gateway-rpi-1/run.py at master · kersing/ttn-resin-gateway-rpi-1 · GitHub

What is going on here? Is this a bug? do I need to set something more with the gateway? Is there another portal that does work? any help is appreciated.

I believe that account link only works on V2 hence its structure (I cant see my V3 gw’s if I try similar - did that recently when checking something on another thread), so as gw is in V3 not V2 the “does not exist” response is correct from the V2 enquiry perspective… I dont think adding the key helps? Poss it tests the key 1st b4 looking for the actual GW and so that error is flagged before it even discovers the gw doesnt exist and hence give that error? One subtle thing I did find was that if gw ID in v3 is same as old v2 if previosuly registered there then the account.thethings… query will still pull the old V2 data… (again as I discovered when dealing with the other thread).

Why would @kersing use this link for a V3 alternative in his implementation of balena?

he’s been busy so I will need to check with him when he comes free and I haven’t used his implementation yet (planning to as I test V3 migration options going forward) but I do recall hearing there was an issue or two involving config or links or something…IIRC called out in another thread so perhaps search forum…maybe that was one of the issues?!

Ok, I investigated again my issue but for some reason, I did not pull the repo of Jac but the repo using V2 account server. My bad.

1 Like

I’ve fixed the instructions which were pointing to the wrong github repository. Apologies for the confusion the oversight caused…