Console Commands
It is possible to use a console command to reconnect or remove the account. This process can be handy when your deployments are automated.
3.0.0
Log-in into Nosto Admin with your already existing account, select the store you want to reconnect and head to
Settings -> Authentication Tokens
.
To obtain the tokens, just hit the decrypt button. 
Since you need a different Nosto account for each store view, you need to get the store scope code. You can find in:
Stores -> All stores

image
Click on your store view:

stores___settings___stores___magento_admin
Copy the value from de
code
field
stores___default_store_view___settings___stores___magento_admin
- Open the terminal and head to you Magento installation path directoryYou can run:
bin/magento nosto:account:connect
and enter the interactive mode, where you will input the required tokens.
In order to use this command with non-interactive installation scripts, you can also pass all the parameters via the command line arguments.
You can use the help from the command to figure out all the necessary parameters:

bin/magento nosto:account:connect \
--account-id=NOSTO_ACCOUNT_NAME \
--sso_token=SSO_TOKEN \
--products_token=PRODUCTS_TOKEN \
--settings_token=SETTINGS_TOKEN \
--rates_token=RATES_TOKEN \
--apps_token=APPS_TOKEN \
--scope-code=STORE_VIEW_SCOPE_CODE --no-interaction

image
This command is used to disconnect an existing account from your store.
- Open the terminal and head to you Magento installation path directoryYou can run:
bin/magento nosto:account:remove
and enter the interactive mode, where you will input the store view scope code.
In order to use this command with non-interactive installation scripts, you can also pass the parameter via the command line arguments.
bin/magento nosto:account:remove \
--scope-code=STORE_VIEW_SCOPE_CODE --no-interaction

image
Last modified 10mo ago