代码如下:
OAuth oauth = OAuthFactory.create(OAuthType.SELF, new OAuthContext(clientId, client_secret, kdt_id));
System.out.println(JsonUtils.toJson(oauth.getToken()));
Itoken = JsonUtils.toJson(oauth.getToken());
YZClient client = new DefaultYZClient(new Token(Itoken));
YouzanTradesSoldGetParams youzanTradesSoldGetParams = new YouzanTradesSoldGetParams();
token能正常获取到但是提示token无效:
{"access_token":"e81b9c012806384fa645de506efe9f6a","refresh_token":null,"expires_in":604800,"scope":"storage points reviews multi_store salesman pay_qrcode item user trade_advanced trade item_category logistics coupon_advanced shop coupon crm_advanced trade_virtual","token_type":null}
Exception in thread "main" com.youzan.open.sdk.exception.KDTException: ErrorResponse{code='40010', msg='参数 token 无效'}
|
|
用手机打开
收藏
赞 1
···
回复
|
|
|
|