Hey everyone, I’m running into a bit of trouble with device permissions on SmartApp after the INSTALL lifecycle. I thought I had everything figured out, but it seems like there’s a hiccup when updating the app. Let me walk through what’s happening and see if anyone has encountered something similar or can offer some insights.
So, here’s the setup: I install the app with 2 out of 3 devices selected. After installation, the app requests device info for these 2 devices, and everything works smoothly using the API. Now, here’s where things get tricky. When the user updates the app and selects all 3 devices, the UPDATE lifecycle is triggered. My app detects a new permission CONFIG with read/write access for the third device. That’s great news, but here’s the snag: when I try to fetch info for this newly added device, I’m met with a 403 Forbidden error. I’ve double-checked the auth token, retried the request, and even restarted the app, but the issue persists.
Looking at the permissions, everything seems in order. The device is listed with R and W access, and the device key is correctly associated with the installed app. I’m starting to wonder if there’s an issue with the API endpoint itself, but it’s puzzling because the INSTALL phase works without any hiccups. It’s only during the UPDATE phase that permissions don’t seem to update properly.
I’m curious if anyone else has dealt with similar API permission issues, especially when scaling up from a few devices to more. Have you encountered situations where permissions aren’t updating as expected during an app update? Any tips on troubleshooting this or ensuring that newly added devices are seamlessly integrated would be greatly appreciated. I’m hoping it’s just a configuration oversight on my part, but I’m at a bit of a loss right now.
Thanks in advance for any advice or suggestions you can share! It’s always reassuring to know that others might have faced and overcome similar challenges.