How to rotate the secret key
The Secret Key is what your Magento store and your Knowledge base REST API scripts use to connect to eChat. Rotate it if it may have been exposed, or on a schedule. A rotation never disconnects your store: it switches to the new key only once the store has saved it.
Rotate the key now
In the Magento admin, go to Stores > Configuration > Mirasvit Extensions > eChat and click Rotate Secret Key on the Account panel.
Or, in the eChat backend (open it with Configure Chat), go to Settings > Security, click Rotate now and confirm.
Rotate it on a schedule
In Settings > Security, choose Every week, Every month or Every 90 days under Scheduled rotation, and click Save. It is Off by default.
Get an email on every rotation
In Settings > Security, tick Email me when the secret key is rotated, check the addresses (the store owner by default, up to 10), and click Save. The email says who rotated the key and where to find the new one. It never contains the key.
What changes after a rotation
- Your storefront is not affected. Running conversations continue without a page reload.
- A rotation started by hand signs everyone out of the eChat backend. Open eChat with Configure Chat again. A scheduled rotation signs nobody out.
- Knowledge base REST API scripts need the new key. The previous one keeps working for 10 minutes.
- A copy of the key you keep to restore the connection must be updated: Restore with credentials needs the current key.
If a rotation does not go through
Nothing changes and the current key stays. Settings > Security lists the latest rotations and why one did not go through, for example when the store could not be reached or its eChat extension is too old to receive a new key.
The key can be rotated by hand up to 5 times in 24 hours. The store must be reachable from the internet, so a development store on a local address keeps its current key.