ring icon indicating copy to clipboard operation
ring copied to clipboard

Refresh Token invalid and can't regenerate new one

Open SlasherKG opened this issue 9 months ago • 8 comments

Is there an existing issue for this?

  • [ ] I have searched the existing issues

Describe The Bug

I have searched and know this is typically due to either a firewall/vpn issue or that Ring has banned my IP temporarily. This first happened last Tuesday, then I was able to regenerate the token and it worked for about another 24 hours. After that, I have not been able to connect or regenerate again even with the cli method. When using the plugin config regenerate option, it throws a "Ring Login Failed Cannot use 'in' operator to search for 'error' in 406 Not Acceptable" error. I included the homebridge logs below.

I suppose it could be they banned me again, but I'm not sure why. I can use the official iOS app from the same network though and it is not blocked.

I'm really struggling to get this working again. Is there any direction or other tips you can provide? It was working fine prior to 6 days ago for over a year.

Thank you.

To Reproduce

No response

Expected behavior

Need to generate a token and have it connect successfully.

Relevant log output

[3/2/2026, 12:44:17 AM] [Ring] Error: 
    at responseToError (file:///var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:33:19)
    at requestWithRetry (file:///var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:81:33)
    at processTicksAndRejections (node:internal/process/task_queues:104:5)
    at RingRestClient.getAuth (file:///var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:212:73) {
  response: {
    headers: Headers {
      date: 'Mon, 02 Mar 2026 05:44:17 GMT',
      'content-type': 'text/plain; charset=utf-8',
      'content-length': '20',
      connection: 'keep-alive',
      'cf-ray': '9d5e16b54f864909-ATL',
      'x-content-type-options': 'nosniff',
      'cf-cache-status': 'DYNAMIC',
      server: 'cloudflare'
    },
    status: 406,
    body: '406 Not Acceptable\n\n'
  }
}
[3/2/2026, 12:44:17 AM] [Ring] Request to https://api.ring.com/devices/v1/locations failed:
[3/2/2026, 12:44:17 AM] [Ring] Error: Refresh token is not valid.  Unable to authenticate with Ring servers.  See https://github.com/dgreif/ring/wiki/Refresh-Tokens
    at RingRestClient.getGrantData (file:///var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:207:15)
    at RingRestClient.getAuth (file:///var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:210:32)
    at RingRestClient.getAuth (file:///var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:251:29)
    at processTicksAndRejections (node:internal/process/task_queues:104:5)
[3/2/2026, 12:44:17 AM] [Ring] Error connecting to API
[3/2/2026, 12:44:17 AM] [Ring] Error: Refresh token is not valid.  Unable to authenticate with Ring servers.  See https://github.com/dgreif/ring/wiki/Refresh-Tokens
    at RingRestClient.getGrantData (file:///var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:207:15)
    at RingRestClient.getAuth (file:///var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:210:32)
    at RingRestClient.getAuth (file:///var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js:251:29)
    at processTicksAndRejections (node:internal/process/task_queues:104:5)

Screenshots

No response

Additional context

No response

OS

Rasbian

Node.js Version

v24.14.0

NPM Version

11.9.0

ring-client-api

14.3.0

Operating System

Rasbian

SlasherKG avatar Mar 02 '26 06:03 SlasherKG

Im having the exact same problems as you. Hoping for a resolution.

ksand012 avatar Mar 02 '26 14:03 ksand012

OK, so I know for sure it's not my ISP IP being blocked. I just tried using a hotspot and get the same exact thing. I hope that someone has some insight as to what's going on...

SlasherKG avatar Mar 03 '26 00:03 SlasherKG

I gave up and just completely rebuilt my raspbian and homebridge installation from scratch and it is now working. Kind of a pain and not sure what caused it, I litterally copied the JSON configs back from the original and pasted into the new one and it still works. Must have been something on the OS or in homebridge itself that was corrupted.

Hopefully this doesn't happen too often.

SlasherKG avatar Mar 03 '26 03:03 SlasherKG

@dgreif and @tsightler - any advice would be appreciated. Still unable to generate tokens. Definitely not on a VPN and it's been working fine for the last two years. :(

ksand012 avatar Mar 06 '26 00:03 ksand012

@dgreif and @tsightler - any advice would be appreciated. Still unable to generate tokens. Definitely not on a VPN and it's been working fine for the last two years. :(

I am seeing this same issue. Everything was working fine for several years, and I am unable to generate tokens, either in the Hoobs editor, or manually via the terminal. I get the same error as SlasherKG.

I have tried to re-flash and reset my Hoobs, and have run into the same issue.

Will this be addressed in a plugin update?

mcwinterr avatar Mar 11 '26 19:03 mcwinterr

I have this same problem. Any known fix yet?

cwintr avatar Apr 28 '26 02:04 cwintr

I experienced this after updating things, and it was because this just doesn't work with node 26. I downgraded to node 24 and I was able to regenerate the token and connect fine.

kemayo avatar Jun 09 '26 01:06 kemayo

I had the same issue. Rolled back to V14.0.0 and generate code. Then rolled up versions one by one worked until v14.3.0 then failed again. Rolled back to v14.2.0 and it is working again. I only generated a new code in V14.0.0. I noticed the code is too short when generated in V14.3.0 but with the correct code from V14.0.0 latest V14.3.0 fails but V14.2.0 works. I have not tried regenerating code since I got the correct one with V14.0.0.

I suspect roll back to V14.2.0 regenerate code may work if not, go back to V14.0.0 generate code and go to V14.2.0 will be a work around.

DKLEUK avatar Nov 23 '26 17:11 DKLEUK