有赞新零售社区

发帖
API使用问题»工具型获取token 授权码非法

工具型获取token 授权码非法

7d6a9e5c2a36 2019-07-01 1962 浏览 6 评论 | 只看楼主 [打印]

将获取到的code 传入后,报错 授权码非法???
用手机打开
收藏 ··· 回复
    7d6a9e5c2a36 青铜   2019-07-01 | 只看该作者




      请求地址:https://open.youzanyun.com/auth/token

      您的请求地址写成了 open.youzan.com,正确的是open.youzanyun.com

        7d6a9e5c2a36 青铜   2019-07-01 | 只看该作者

        获取 工具型token 参数错误

        lass="quote 15">
        有赞_程志 发表于 2019-7-1 09:51
        请求地址:https://open.youzanyun.com/auth/token

        您的请求地址写成了 open.youzan.com,正确的是open.y ...


        好的,地址我改完了 ,但是又出现了 参数错误
        如果是
        .setContentType(ContentType.APPLICATION_FORM_URLENCODED).build();
        就会是报:resp:{"success":false,"code":1000,"data":null,"message":"Content type 'application/x-www-form-urlencoded;charset=ISO-8859-1' not supported,Please use 'application/json;charset=UTF-8'"}

        如果是
        .setContentType(ContentType.APPLICATION_JSON).build()

        就会是 参数错误 ,根据返回的错误信息并不能看出来是哪个参数错误


          7d6a9e5c2a36 发表于 2019-7-1 11:53
          好的,地址我改完了 ,但是又出现了 参数错误
          如果是
          .setContentType(ContentType.APPLICATION_FORM_URLE ...


          请参考这个文档:https://doc.youzanyun.com/doc#/content/27027/27628

          POST https://open.youzanyun.com/auth/token
          Content-Type: application/json
          {
          "authorize_type": "authorization_code",
          "client_id": "bifrost-tool",
          "client_secret": "bifrost-tool",
          "code": "code"
          }

            victor.骆   青铜   2019-07-27 | 只看该作者
            这个code是从哪里查看到的呢,我点击获取code后,没有跳转,只是提示获取成功,但是找不到code。有清楚的吗

              code 会发送到您的回调地址,具体请详细研读文档:https://doc.youzanyun.com/doc#/content/27027/27665
              有赞-技术支持

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

                本版积分规则

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

                • 评分

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

                复制成功