最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】使用销售易Open API接口

工作和技术 crifan 3680浏览 0评论

参考:

Open API使用手册

第二章销售易API使用说明

然后发现自己之前都用过Postman,用过这套接口

所以继续去使用新的

client_id

redirect_uri

即可。

再去新建一个。

想要用Postman去获取,发现不对:

所以直接浏览器去打开:

https://crm.xiaoshouyi.com/oauth/oauth2/authorize.action?response_type=code&client_id=b37389995a4f2ed342055498d3b99f44&redirect_uri=https://api.xiaoshouyi.com/

返回:

https://api.xiaoshouyi.com/?code=69c10ade32e45cd58fe1ef0ae3336eae6d73f009fdeae1eda8d72bfa574a9db9

此处的code就是我们要的:

  • code: 69c10ade3xxxxda8d72bfa574a9db9

然后去:

  • grant_type: authorization_code

  • client_id: b373899xxx99f44

  • client_secret: 8f53d6xxx15

  • redirect_uri: https://xxx.xiaoshouyi.com/

  • code: 69cxxxb9

POST https://api.xiaoshouyi.com/oauth2/token.action?grant_type=authorization_code&client_id=b3xxxf44&client_secret=8fxxx215&redirect_uri=https://xxx.xiaoshouyi.com/&code=69c1xxxb9

Response:

{

    “id”: 868161,

    “access_token”: “8fxxx12aeddc7a6ca904904799”,

    “refresh_token”: “9f907a3a4836efd1f65xxxd3”,

    “issued_at”: 15xxx5390,

    “token_type”: “Bearer”

}

获取安全令牌

重置安全令牌

安全令牌:xxxxV

然后试试

密码模式(获取token)

POST

https://api.xiaoshouyi.com/oauth2/token?grant_type=password&client_id=b3xxx4&client_secret=8fxxx15&redirect_uri=https://xxxoshouyi.com/&[email protected]&password=LMxxxV

{

    “id”: 868161,

    “access_token”: “4017e6xxx3bc017ad”,

    “issued_at”: 151xxx7,

    “token_type”: “Bearer”

}

转载请注明:在路上 » 【已解决】使用销售易Open API接口

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
80 queries in 0.165 seconds, using 22.11MB memory