Certificate failure for REST API endpoints

Howdy: Long time listener, first time caller [ok oops apparently I had posted before and forgot]

I understand that the REST API is unsupported, and likely never to be so please, no need to remind me of that.

I have an application (that I did not write, but am in the unenviable position of maintaining) which (among other things) sends REST calls to a variety of Wyze API endpoints to get cam events, device lists, etc.

This has recently (today) started failing with an error like:
Post “https://api.wyzecam.com/app/v2/device/get_event_list”: tls: failed to verify certificate: x509: certificate signed by unknown authority

Googling (and, lord help me, asking an AI) indicate this may be due to some upstream change in the way root certs are handled and that the fix would need to come on the Wyze side (they may be using an outdated cert bundle that doesn’t reflect whatever this change is). I have tried what was suggested on the Ubuntu box where the app runs (updating the local cert bundles) and that didn’t fix it.

My real question is: has anyone else who’s doing something similar with the (undocumented, unsupported) REST API encountered this? Did you have a work-around?

I can say that people running other systems reliant on the API such as Docker Wyze Bridge have indicated that Wyze recently changed their authentication away from the TUTK to something else and it broke a lot of their functionality since TUTK isn’t working on A lot of cameras that third party systems were previously reliant upon using to access them. Your problems could absolutely be related to that.

A second potential issue, which is less likely given the error you are seeing, but I’ll mention anyway, is that previous projects that used to poll the API for camera data (events/motion, etc) were eventually restricted through implementation of a Rate limit. The excessive polling on their API (As opposed to a “push” of relevant data only when something changes) caused Wyze to start doing things to shut down those excessive uses. Given the fact that you mentioned:

That used to be something they were monitoring and previously instructed some developers to lay off of doing (not counting accessing already recorded past cloud events which seems to be okay). For example, some people were constantly polling the cameras so that they could essentially use them like a motion detector sensor, but this excessive polling was straining Wyze’s servers, And those kind of live events data they tried to ban.

Main reason I think it might not be related to the tutk change is that you should still be able to pull device lists and other things. The tutk authentication issue should primarily only prevent you from being able to connect to the camera directly.

Therefore, I really might be some kind of certificate issue.

I don’t remember anything about the API key/ID needing to be renewed, but maybe check if it expired? Though, that should be more of an individual issue, and by implication project is having problems for lots of people all at the same time? So that would indicate it’s probably not that.

I will keep an eye out for other people reporting certificate issues. So far my third party projects are functioning today though And if it really was a company-wide certificate problem, then all of my third-party stuff should have stopped working too.

I know a lot of that is probably not very helpful, So I almost didn’t post at all, but since I was aware of the above things that are at least somewhat related, I figure I might as well share some of it. Who knows, maybe it will even give your AI an idea of other things to consider.

Thanks very much for your reply - that’s a few things I didn’t know. And I wasn’t necessarily clear here, it’s not the API key or access/refresh tokens, but something in the actual SSL (?) certificate chain. I was able to download a cert from DigiSign and install it locally and that got things working again. I am very much the Dog At Computer Keyboard meme when it comes to anything auth or security related so I have no idea if I have traded one problem for another.

I don’t have anything to add to this (above my pay grade), but even with the correction to the “first time caller” comment, I was still amused by reading the initial post. :grin::+1:

Good luck with your project!

Having this issue with home assistant. Please someone do something…