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¶
- Sign in to seller.wildberries.ru with an account that has administrator rights. Tokens created by a limited user inherit that user's restrictions.
- Go to Settings → API access.
-
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 -
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.
- Paste it into
.envasWB_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.
- Sign in to seller.ozon.ru.
- Go to Settings → Seller API.
- Select Generate key and grant Analytics, Finance, Warehouses and Postings.
- Copy both the Client ID and the API key into
.envasOZON_CLIENT_IDandOZON_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:
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.
- Message @BotFather and send
/newbot. - Follow the prompts and copy the token it returns.
- Send any message to your new bot so that it is allowed to write to you first.
- Get your chat ID by opening
https://api.telegram.org/bot<TOKEN>/getUpdatesin a browser and reading thechat.idfield. - Put both values in
.envasTG_TOKENandTG_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:
The ETL scripts read .env on each run and need no restart. Historical data already in
the database is unaffected by a key change.