有赞新零售社区

发帖
API使用问题»获取的token无效

获取的token无效

6906988c0052 2018-01-30 5952 浏览 3 评论 | [显示全部楼层] [打印]
代码如下:
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 ··· 回复
    已通过在线客服反馈问题

      1跳至
      您需要登录后才可以回帖 登录 | 立即注册

      本版积分规则

      复制链接
      新浪微博
      QQ空间
      微信扫码
      • 回复

      • 评分

      客服工作时间是9:00-18:00,客服妹子当前不在线,若不能及时回复请谅解。试试右上角的搜索吧,论坛有丰富的经验贴、公告贴,相信一定能够帮到您~

      复制成功