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

Getting tokens from the Nosto Admin Panel.

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.

Getting Store View Scope Code From Magento's Backend

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

Using the Console Command to Reconnect Your Existing Nosto Account

Using the interactive mode

  • Open the terminal and head to you Magento installation path directory
    You can run:
    bin/magento nosto:account:connect and enter the interactive mode, where you will input the required tokens.

Using the non-interactive mode

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:

Example of non-interactive command:

1
bin/magento nosto:account:connect \
2
--account-id=NOSTO_ACCOUNT_NAME \
3
--sso_token=SSO_TOKEN \
4
--products_token=PRODUCTS_TOKEN \
5
--settings_token=SETTINGS_TOKEN \
6
--rates_token=RATES_TOKEN \
7
--apps_token=APPS_TOKEN \
8
--scope-code=STORE_VIEW_SCOPE_CODE --no-interaction
Copied!
image

Using the Console Command to Remove Nosto account from your store view

This command is used to disconnect an existing account from your store.

Using the interactive mode

  • Open the terminal and head to you Magento installation path directory
    You can run:
    bin/magento nosto:account:remove and enter the interactive mode, where you will input the store view scope code.

Using the non-interactive mode

In order to use this command with non-interactive installation scripts, you can also pass the parameter via the command line arguments.

Example of non-interactive command:

1
bin/magento nosto:account:remove \
2
--scope-code=STORE_VIEW_SCOPE_CODE --no-interaction
Copied!
image