const getOpenId = async function (code) {
// https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code
const { data } = await axios.get('https://api.weixin.qq.com/sns/oauth2/access_token', {
params: {
appid: config.wechatPay.appid,
secret: config.wechatPay.secret,
code,
grant_type: 'authorization_code',
},
});
return data;
};
-
Notifications
You must be signed in to change notification settings - Fork 0
waitkafuka/wechat-get-openid
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published