Skip to content

Connect your marketplace accounts

The platform reads data through the marketplaces' official seller APIs. Each one issues a token from the seller cabinet, and each one scopes that token to a set of permissions you choose at creation time. Picking the wrong set is the single most common cause of an import that appears to succeed while writing nothing.

Wildberries

  1. Sign in to seller.wildberries.ru with an account that has administrator rights. Tokens created by a limited user inherit that user's restrictions.
  2. Go to Settings → API access.
  3. Select Create token and grant these categories:

    Category Used for
    Statistics Sales, orders, revenue and deduction figures
    Content Product names and categories
    Analytics Listing impressions, clicks and cart adds
    Warehouse Stock levels per warehouse
  4. Copy the token immediately. Wildberries shows it once and cannot display it again; if you lose it, you revoke it and issue a new one.

  5. Paste it into .env as WB_TOKEN.

Tokens are valid for 180 days. Nothing warns you before one expires, and an expired token produces the same silent empty import as a missing permission, so note the expiry date somewhere you will see it.

Ozon

Ozon uses a pair of values rather than a single token: a numeric client ID identifying the seller account, and an API key.

  1. Sign in to seller.ozon.ru.
  2. Go to Settings → Seller API.
  3. Select Generate key and grant Analytics, Finance, Warehouses and Postings.
  4. Copy both the Client ID and the API key into .env as OZON_CLIENT_ID and OZON_API_KEY.

The client ID is not secret and appears in the seller cabinet interface. The API key is, and like the Wildberries token it is shown once.

Verify the connection

Import a short window for one marketplace at a time. Two days is enough to prove the credentials work without waiting for a long fetch:

python run_etl.py --wb --days 2
python run_etl.py --ozon --days 2

Each run prints a success or failure line per marketplace. A failure line carries the underlying error, which is usually specific enough to identify the cause: authentication errors name the credential, permission errors name the endpoint that was refused.

A run that reports success but leaves the dashboard empty is a different problem, and Troubleshooting covers it.

Telegram alerts

Optional. Without a bot token everything works except the 09:00 stock message.

  1. Message @BotFather and send /newbot.
  2. Follow the prompts and copy the token it returns.
  3. Send any message to your new bot so that it is allowed to write to you first.
  4. Get your chat ID by opening https://api.telegram.org/bot<TOKEN>/getUpdates in a browser and reading the chat.id field.
  5. Put both values in .env as TG_TOKEN and TG_CHAT_ID.

Step 3 is not optional. A Telegram bot cannot open a conversation with a user, so until you write to it first, every alert fails with a permission error.

Rotating a key

Replace the value in .env and restart the API service so it picks up the new environment:

sudo systemctl restart mp-api

The ETL scripts read .env on each run and need no restart. Historical data already in the database is unaffected by a key change.