微信扫码授权码换 token(subject=unionid||openid,首次即注册)
POST
/v1/auth/wechat/exchange
const url = 'https://api.tansr.com/v1/auth/wechat/exchange';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"code":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tansr.com/v1/auth/wechat/exchange \ --header 'Content-Type: application/json' \ --data '{ "code": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
code
required
微信 qrconnect 回调授权码
string
Examplegenerated
{ "code": "example"}Responses
Section titled “Responses”Token
微信登录未交割(ED-S8)
本文是否有帮助?
感谢反馈,我们会持续改进这篇文章。