You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wechatqy/connect.oauth2.authorize.go

13 lines
426 B

package wechatqy
import (
"context"
"fmt"
)
// ConnectOauth2Authorize 构造网页授权链接
// https://work.weixin.qq.com/api/doc/90000/90135/91022
func (c *Client) ConnectOauth2Authorize(ctx context.Context) string {
return fmt.Sprintf("https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect", c.GetAppId(), c.GetRedirectUri())
}