支付宝小程序沙箱环境后台接口调试

1.设置沙箱环境参数

https://openhome.alipay.com/platform/appDaily.htm?tab=info

用沙箱环境提供的

appid,api(网关https://openapi.alipaydev.com/gateway.do),设置RSA2(SHA256)密钥,这里的密钥可用支付宝提供的密钥生成工具

2.填写回调地址,本地接口即可

 3.下载沙箱钱包(选择)

4.拼写授权链接,用pc浏览器或其他打开,使用沙箱账号,登录

https://openauth.alipaydev.com/oauth2/publicAppAuthorize.htm?app_id=xxxxxxxx&scope=auth_user&redirect_uri=http:127.0.0.1:8000/third-user/test

 注意:scope为auth_user时,支付宝小程序后台接口才可以用accesstoken换取用户信息

原文地址:https://www.cnblogs.com/brxHqs/p/13231021.html