Qeasy Cloud
Get Started
POSThttps://openapi.jushuitan.com/openWeb/auth/getInitTokenapp_key + app_secret 签名换 token

Get Initial Token (Self-owned Mall App)

聚水潭新版开放平台授权接口:自有商城应用凭 app_key + 签名获取初始 access_token/refresh_token,到期前用 refreshToken 续期,业务接口凭 access_token + 签名调用。

## Overview The new Jushuitan open platform (openweb.jushuitan.com) uses an OAuth-style access_token system. Integrations serving a single ERP merchant create a "self-owned mall app"; ISVs serving many merchants create a "service provider app" and follow the authorize-URL + code flow. Once a self-owned app is approved, getInitToken issues the initial access_token/refresh_token pair; refresh before expiry via the refreshToken endpoint. ### Signing rules 1. Sort every request parameter except sign ascending by name (ASCII). 2. Concatenate as key+value pairs with no separator and no URL-encoding. 3. Prepend and append the app_secret. 4. MD5 the result (32-char hex) — that is the sign. Common request parameters: app_key, timestamp (Unix seconds; must be within 10 minutes of Jushuitan server time), charset (utf-8), grant_type and sign. ### Response and usage Success returns code = 0 with data.access_token, data.refresh_token and data.expires_in. Business calls place access_token among the common parameters and re-sign. The Qeasy connector encapsulates token acquisition, caching and automatic renewal. ### Error handling code = 100 means the access_token has timed out — renew it with the refresh_token or re-authorize; code = 10 is an invalid signature — double-check parameter ordering and the app_secret. ### Service-provider flow ISV apps do not call getInitToken directly: they generate an authorization URL, the merchant admin approves it, Jushuitan pushes a code to the ISV callback, and the ISV exchanges that code for the token pair. The callback must answer {"code":0} within the required window, otherwise the platform retries the push and duplicate codes must be handled idempotently.

Code examples

curl
curl -X POST "https://openapi.jushuitan.com/openWeb/auth/getInitToken" \
  -H "Content-Type: application/json" \
  -d '{"app_key":"your_app_key","timestamp":1780000000,"charset":"utf-8","grant_type":"init_token","sign":"SIGN"}'

Error codes

CodeMessageMeaning
0执行成功授权成功
10验证失败!无效签名签名错误,核对参数排序、拼接与 app_secret
100access_token 超时token 过期,使用 refresh_token 续期或重新授权
110验证失败授权已失效或被回收,需重新完成应用授权