Hello,
Thank you for reaching out.
To address this, you can increase the session timeout for the API by modifying the api_session_timeout
parameter in the router’s configuration. This will extend the time before the access token expires. Below are the steps to achieve it:
- Access the router’s CLI via SSH or WebUI:
- Connect to your router with an SSH client (e.g., PuTTY).
- Enter the router’s IP address, then log in using your credentials.
- Once logged in, open the configuration file using a text editor like
vim
ornano
:
vim /etc/config/vuci
or
nano /etc/config/vuci
- Modify the Session Timeout:
- Locate the
api_session_timeout
setting in the configuration file. - By default, this value is set to
300
seconds (5 minutes). You can increase this to600
(10 minutes) or higher, depending on your needs.
- Save and Exit:
- If using
vim
, pressESC
, then type:wq
to save and exit. - If using
nano
, pressCTRL + X
, thenY
, andEnter
to save and exit.
Once the api_session_timeout
is increased, the access token should remain valid for a longer period, reducing the need to constantly retrieve a new token.
If you need further assistance, feel free to reach out.
Best Regards,