Qeasy Cloud
Get Started
GEThttps://api.yonyouup.com/system/tokenAppKey/AppSecret 换 token

Get Global Token

用友 U8 开放平台鉴权接口:凭 AppKey/AppSecret 换取全局 token(有效期 2 小时,2 小时内最多获取 2000 次),所有 U8 OpenAPI 业务调用必须携带该 token。

## Overview Before calling any business API on the Yonyou U8 open platform, the client must obtain a global token. A token lives for 2 hours and can be shared across all business calls; the platform caps token issuance at 2000 per 2 hours, so callers must cache the token locally and only refresh it near expiry. ### Request parameters 1. from_account — the source account assigned to the integration. 2. to_account — the target U8 enterprise account set. 3. app_key / app_secret — issued when the application is created in the U8 open platform console. 4. token — pass the previous token for renewal, or leave empty for the first request. ### Response errcode 0 means success. The token object carries id (the token value), appKey and expiresIn (seconds). Business APIs are then called with token plus from_account, to_account, app_key and app_secret as URL query parameters. ### Production advice - The Qeasy U8 connector centralizes the token lifecycle: a singleton cache, proactive refresh five minutes before expiry, and circuit-breaker re-issue on failure — preventing parallel jobs from exhausting the 2000-per-2h quota. - On-premise U8 deployments require the Yonyou OpenAPI client agent; external systems relay through that agent to the U8 application server.

Code examples

curl
curl -G "https://api.yonyouup.com/system/token" \
  --data-urlencode "from_account=source_acc" \
  --data-urlencode "to_account=u8_acc" \
  --data-urlencode "app_key=your_app_key" \
  --data-urlencode "app_secret=your_app_secret" \
  --data-urlencode "token="

Error codes

CodeMessageMeaning
0成功token 获取成功
20005U8 服务调用失败U8 后端 EAI 执行异常,检查 U8 应用服务器与 EAI 配置