Logic Machine Forum
Storing Long Access Tokens - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Storing Long Access Tokens (/showthread.php?tid=3824)



Storing Long Access Tokens - jamesng - 25.01.2022

Hi

I need to store a user-updatable / logic machine script-updateable access token which is approx 2600 characters long.  I would normally store this type of value as a User Parmeter however the string datatype here is only 255 bytes.

Short of hard coding this into a script, is there any other way that I can store this token?  Directly in the database perhaps?

Im running SHAC firmware 1.10.0.

Many thanks in advance

Kind Regards
James


RE: Storing Long Access Tokens - Daniel - 25.01.2022

Why don't you use storage?


RE: Storing Long Access Tokens - jamesng - 25.01.2022

Thanks pointing me to use storage .. I've always overlooked storage.set() .. It's the perfect solution!

Kind Regards
James


RE: Storing Long Access Tokens - jamesng - 26.01.2022

Is there way to browse all stored data (without knowing a specific key that's been used to identify the stored info)?

Kind Regards
James


RE: Storing Long Access Tokens - admin - 26.01.2022

You can use storage.all() and storage.keys() for this. In LM there's a storage viewer app which can be used instead of scripts.


RE: Storing Long Access Tokens - jamesng - 26.01.2022

Many thanks for the scripted solution - these work well

Is there now a way to install apps on the Schneider SHAC version (firmware Version: 1.10.0) of LogicMachine?

Kind Regards
James


RE: Storing Long Access Tokens - Daniel - 26.01.2022

No