메소드 | 설명 | |
---|---|---|
GetAccessToken ( string appId, string componentAppid, string componentAccessToken, string code, string grantType = "authorization_code" ) : |
获取AccessToken
|
|
GetAccessTokenAsync ( string appId, string componentAppid, string componentAccessToken, string code, string grantType = "authorization_code" ) : Task |
【异步方法】获取AccessToken
|
|
GetAuthorizeUrl ( string appId, string componentAppId, string redirectUrl, string state, OAuthScope scopes, string responseType = "code" ) : string |
获取验证地址
|
|
GetUserInfo ( string accessToken, string openId, Language lang = Language.zh_CN ) : |
获取用户基本信息
|
|
GetUserInfoAsync ( string accessToken, string openId, Language lang = Language.zh_CN ) : Task |
【异步方法】获取用户基本信息
|
|
RefreshToken ( string appId, string refreshToken, string componentAppid, string componentAccessToken, string grantType = "refresh_token" ) : |
刷新access_token(如果需要)
|
|
RefreshTokenAsync ( string appId, string refreshToken, string componentAppid, string componentAccessToken, string grantType = "refresh_token" ) : Task |
【异步方法】刷新access_token(如果需要)
|
public static GetAccessToken ( string appId, string componentAppid, string componentAccessToken, string code, string grantType = "authorization_code" ) : |
||
appId | string | |
componentAppid | string | 服务开发方的appid |
componentAccessToken | string | 服务开发方的access_token |
code | string | GetAuthorizeUrl()接口返回的code |
grantType | string | |
리턴 |
public static GetAccessTokenAsync ( string appId, string componentAppid, string componentAccessToken, string code, string grantType = "authorization_code" ) : Task |
||
appId | string | |
componentAppid | string | 服务开发方的appid |
componentAccessToken | string | 服务开发方的access_token |
code | string | GetAuthorizeUrl()接口返回的code |
grantType | string | |
리턴 | Task |
public static GetAuthorizeUrl ( string appId, string componentAppId, string redirectUrl, string state, OAuthScope scopes, string responseType = "code" ) : string | ||
appId | string | 公众号的appid |
componentAppId | string | 第三方平台的appid |
redirectUrl | string | 重定向地址,需要urlencode,这里填写的应是服务开发方的回调地址 |
state | string | 重定向后会带上state参数,开发者可以填写任意参数值,最多128字节 |
scopes | OAuthScope | |
responseType | string | 默认,填code |
리턴 | string |
public static GetUserInfo ( string accessToken, string openId, Language lang = Language.zh_CN ) : |
||
accessToken | string | 调用接口凭证 |
openId | string | 普通用户的标识,对当前公众号唯一 |
lang | Language | 返回国家地区语言版本,zh_CN 简体,zh_TW 繁体,en 英语 |
리턴 |
public static GetUserInfoAsync ( string accessToken, string openId, Language lang = Language.zh_CN ) : Task |
||
accessToken | string | 调用接口凭证 |
openId | string | 普通用户的标识,对当前公众号唯一 |
lang | Language | 返回国家地区语言版本,zh_CN 简体,zh_TW 繁体,en 英语 |
리턴 | Task |
public static RefreshToken ( string appId, string refreshToken, string componentAppid, string componentAccessToken, string grantType = "refresh_token" ) : |
||
appId | string | |
refreshToken | string | 填写通过access_token获取到的refresh_token参数 |
componentAppid | string | |
componentAccessToken | string | |
grantType | string | |
리턴 |
public static RefreshTokenAsync ( string appId, string refreshToken, string componentAppid, string componentAccessToken, string grantType = "refresh_token" ) : Task |
||
appId | string | |
refreshToken | string | 填写通过access_token获取到的refresh_token参数 |
componentAppid | string | |
componentAccessToken | string | |
grantType | string | |
리턴 | Task |