Hi everyone. First post so apologies if I’ve not got the level right.
I’m using this API to claim a TTI Indoor gateway:
https://www.thethingsindustries.com/docs/reference/api/gateway/#message:ClaimGatewayRequest
When I POST to the url (I’ve obfuscated the actual details with XXXXXX’s here):
https://XXXXXX.eu1.cloud.thethings.industries/api/v3/gcls/claim
With the following body:
{
"authenticated_identifiers": {
"gateway_eui": "XXXXXX",
"authentication_code": "XXXXXX"
},
"collaborator": {
"organization_ids": {
"organization_id": "XXXXXX"
}
},
"cups_redirection": {
"target_cups_uri": "https://XXXXXX.eu1.cloud.thethings.industries:443"
},
"target_gateway_id": "XXXXXX",
"target_gateway_server_address": "XXXXXX.eu1.cloud.thethings.industries",
"target_frequency_plan_id": "EU_863_870_TTN"
}
And all the correct authentication headers.
The Gateway does not get claimed, but instead I receive a “could not update CUPS credentials” message, and the gateway ends up in my “Deleted (Admin)” section of the console.
{
"code": 10,
"message": "error:pkg/deviceclaimingserver/gateways:update_cups_credentials (could not update CUPS credentials)",
"details": [
{
"@type": "type.googleapis.com/ttn.lorawan.v3.ErrorDetails",
"namespace": "pkg/deviceclaimingserver/gateways",
"name": "update_cups_credentials",
"message_format": "could not update CUPS credentials",
"correlation_id": "50319dc8d28b4f389f887ea93f882331",
"cause": {
"namespace": "pkg/deviceclaimingserver/gateways",
"name": "operation_unsuccessful",
"message_format": "operation `{name}` unsuccessful after `{number}` attempts",
"attributes": {
"name": "update CUPS configuration",
"number": 5
},
"correlation_id": "a106c1ea88e04aee979f3fa8b89917d7",
"cause": {
"namespace": "pkg/deviceclaimingserver/gateways/semtechrjs",
"message_format": "Unauthorized",
"correlation_id": "0dc707f67f7846979f28dfa34506a15e",
"code": 16
},
"code": 13
},
"code": 10
}
]
}
I have found that if I purge the gateway I can repeat this, with the same result, many times.
Curiously, I’ve also found that if I purge it, then manually claim the gateway through the UI/Console that it will claim successfully. If I then delete it again, the API call above will now work without any modification. This implies that there is some extra step needed during initial registration that is missing through the API.
Does anyone have any experience of this error or can suggest what I’ve done wrong?
I saw a post from 2021 (Move your TTIG to V3: YES! - #19 by rikietje) that implied that it was an upstream server that was not functioning correctly, but I’m not sure if there’s anything I can do differently here or how to get that fixed. Any suggestions welcome.