Private channel access via URL?
Thomas Lowell
le 18 Jan 2024
Dernière activité Réponse par Thomas Lowell
le 22 Mar 2024
I'd like to give someone quick access to a private channel via a URL. Basically, I'd like to place a QR code sticker on the device so that any time they want, they can quickly check out how the device data is trending by pointing their cell phone camera at the QR code and clicking. Ez-peezie. This works with a public channel because no authentication is required,
Is there a way to do this with a private channel? I was hoping I could add their email address to the sharing tab for the channel and then, after they had logged into Thingspeak on their phone with their own account, perhaps their browser state would be retained and when the camera launched a browser tab with the url, it would work. But alas, I've probably over-simplied the credentials aspect betwen the camera app and the brower app. At least it doesn't seem to work with Safari or Chrome on IOS.
Does anyone know of an easy way (easy for the end user) to make this work?
6 commentaires
Date décroissanteHi Christopher,
I'm wrapping up my implementation of this approach and would appreciate double-checking my understanding of "sharing via email address "with you..
I initally thought that the "Share channel view only with the following users:" functionality in the "Channel Sharing Settings" on the "Sharing" tab of the web UI was only useful if the user was logged into the web UI and browsing to the shared channel. But while testing some use cases in order to write this note I realized the grantee (the user who's emai address is listed in the sharing tab) can view charts via a URL if they're logged in (and they'll be prompted if to log in they aren't)
Select users can view this chart with out an API key if shared with their email.
So, regarding to my idea of putting a QR code sticker on my device that points to the ThingSpeak data; It seems I have to chose between two options:
(a) create the QR code based on a url that shares to a specific user. The downside is they'll have to log in, or be logged and they'll only be able to see one chart per QR code because access is only hru the chart API, or...
(b) create the QR code based on a url that includes an API key. While the user won't have to log in, or be logged in, the downside is that anyone can see the chart (although using a second read key, I can easily invalidate the key if this becomes and issue). And again, they will only be able to see one chart per QR code.
Does that sound right? Is there any way to view all fields charts at once via a url on a private channel like one can for a public channel?
thanks!
Use the charts API to create a URL for the plot of interest, and embed the Read API key in the URL for the QR code. Anyone who sans the code can see the plot, but you can revoke the read API key anytime you need to. You can also create multiple read API keys for the channel and revoke specific users credentials when needed.
As an example, the attached QR code should take to to a photo of my plant (actually it may have been your plant at one point). Its public, but you can embed the read API key into the URL for a private plot.
Connectez-vous pour participer