## 对外接口使用 ### 1、生成appId和appSecret ![](https://img.kancloud.cn/49/49/4949264cf88554bbcc91ae719258defa_554x216.png) ### 2、用appId和appSecret获取token 接口路径:域名/outapi/get_token 请求方式:POST 参数:appid,appsecret 拿到返回的token ![](https://img.kancloud.cn/97/16/9716b56c9714062721297ad30e359253_553x121.png) ![](https://img.kancloud.cn/19/b0/19b086e87bf0d071217fad780e99018f_554x122.png) ### 3、根据token来获取相应的接口数据 Headers里带上token ![](https://img.kancloud.cn/28/77/287737e33daa22f9cf8c4fd634ddc9d7_553x124.png) ### 例如: 获取商品分类列表 接口地址:域名/outapi/product/category 请求方式:GET Headers: Authori-zation:Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJwcm8xNC5saXVzbGluLnRvcCIsImF1ZCI6InBybzE0LmxpdXNsaW4udG9wIiwiaWF0IjoxNjI4NjgwMDc0LCJuYmYiOjE2Mjg2ODAwNzQsImV4cCI6MTYyODc2NjQ3NCwianRpIjp7ImlkIjoxLCJ0eXBlIjoib3V0In19.0Jum8MGx6Q2SejNrRmUfp7LBqlWCxDgDR8kLMSuaMMY ![](https://img.kancloud.cn/00/db/00db7bc70c34a747ffd662f98779ac3f_1139x292.png) 返回数据: ![](https://img.kancloud.cn/0d/98/0d98c6c885433a56cb88204875dc4b69_948x378.png) ### **其他接口请参考接口文档的对外接口**