Links

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.
cropper

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.
    image

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:
image

Example of non-interactive command:

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

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.
    image

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:

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