ms_set_key
Change or rotate the API key for Moysklad when it expires or is compromised. Requires acknowledgment of key exposure in chat.
Instructions
Change / rotate the API key from chat (e.g. the old one expired or leaked).
⚠️ The key goes into the chat transcript — requires i_understand_key_goes_to_chat=true. The safe, terminal-free alternative is the installer, where the key never enters chat. Use a scoped key and rotate it in the seller cabinet if it was exposed.
Args: credentials: dict with the required fields ({fields}). cabinet: which cabinet to update. Default: the active one (so "my key expired" just works). If there is none, the cabinet is named from the marketplace's shop name, else "main". i_understand_key_goes_to_chat: must be true to proceed. On success the key is validated against the marketplace and the shop name is reported. Saved locally (chmod 600), never echoed back.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cabinet | No | ||
| credentials | Yes | ||
| i_understand_key_goes_to_chat | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |