## Overview
Youzan Cloud distinguishes tool apps (serving many shops via OAuth code flow) from self-use apps (serving your own shop, no authorization code needed). A self-use app calls this endpoint with authorize_type=silent to directly obtain a shop-scoped access_token, passing client_id, client_secret and kdt_id (the shop ID, visible via youzan.shop.get or the shop admin). The default token lifetime is 7 days; after a refresh, the old token keeps a 1-hour grace period.
### Steps
1. Create a self-use app in the Youzan Cloud console; note client_id/client_secret.
2. Exchange for the token (data.access_token) and keep refresh_token/authority_id for renewal.
3. Apply for the API capability packages (trade, items, ...) under Category Capabilities — calls fail until approved.
4. Business calls follow https://open.youzanyun.com/api/{api_name}/{api_version}?access_token=xxx.
### Response
Success: {"success":true,"code":200,"data":{"access_token":"...","expires_in":604800,...}}. Failures return success=false with codes such as 1000 (bad client_secret) or 1103 (unknown client_id or missing grant).
### Production advice
Cache the token centrally and refresh ahead of expiry. A token manually refreshed elsewhere dies early and forces re-authorization — never let multiple environments share and overwrite one token.
### Kdt id and retail chains
Retail-chain tenants have one kdt_id per shop plus a headquarters id, and tokens are shop-scoped: a chain integration maintains one token per shop and aggregates at the platform layer. Calling a shop API with the headquarters token returns authorization errors that look like permission problems — when a call fails with 4204, check the kdt_id before anything else.