C# 클래스 Senparc.Weixin.Open.ComponentAPIs.ComponentApi

ComponentApi
파일 보기 프로젝트 열기: JeffreySu/WeiXinMPSDK 1 사용 예제들

공개 메소드들

메소드 설명
ApiAuthorizerToken ( string componentAccessToken, string componentAppId, string authorizerAppId, string authorizerRefreshToken = null, int timeOut = Config.TIME_OUT ) : RefreshAuthorizerTokenResult

获取(刷新)授权公众号的令牌 由于access_token拥有较短的有效期,当access_token超时后,可以使用refresh_token进行刷新,refresh_token拥有较长的有效期(30天),当refresh_token失效的后,需要用户重新授权。

ApiAuthorizerTokenAsync ( string componentAccessToken, string componentAppId, string authorizerAppId, string authorizerRefreshToken = null, int timeOut = Config.TIME_OUT ) : Task

【异步方法】获取(刷新)授权公众号的令牌 由于access_token拥有较短的有效期,当access_token超时后,可以使用refresh_token进行刷新,refresh_token拥有较长的有效期(30天),当refresh_token失效的后,需要用户重新授权。

ApiConfirmAuth ( string componentAccessToken, string componentAppId, string authorizerAppid, int funscopeCategoryId, int confirmValue, int timeOut = Config.TIME_OUT ) : WxJsonResult

确认授权

ApiConfirmAuthAsync ( string componentAccessToken, string componentAppId, string authorizerAppid, int funscopeCategoryId, int confirmValue, int timeOut = Config.TIME_OUT ) : Task

【异步方法】确认授权

GetAuthorizerInfo ( string componentAccessToken, string componentAppId, string authorizerAppId, int timeOut = Config.TIME_OUT ) : GetAuthorizerInfoResult

获取授权方信息 注意:此方法返回的JSON中,authorization_info.authorizer_appid等几个参数通常为空(哪怕公众号有权限)

GetAuthorizerInfoAsync ( string componentAccessToken, string componentAppId, string authorizerAppId, int timeOut = Config.TIME_OUT ) : Task

【异步方法】获取授权方信息 注意:此方法返回的JSON中,authorization_info.authorizer_appid等几个参数通常为空(哪怕公众号有权限)

GetAuthorizerOption ( string componentAccessToken, string componentAppId, string authorizerAppId, OptionName optionName, int timeOut = Config.TIME_OUT ) : AuthorizerOptionResult

获取授权方的选项设置信息

GetAuthorizerOptionAsync ( string componentAccessToken, string componentAppId, string authorizerAppId, OptionName optionName, int timeOut = Config.TIME_OUT ) : Task

【异步方法】获取授权方的选项设置信息

GetComponentAccessToken ( string componentAppId, string componentAppSecret, string componentVerifyTicket, int timeOut = Config.TIME_OUT ) : ComponentAccessTokenResult

获取第三方平台access_token

GetComponentAccessTokenAsync ( string componentAppId, string componentAppSecret, string componentVerifyTicket, int timeOut = Config.TIME_OUT ) : Task

【异步方法】获取第三方平台access_token

GetComponentLoginPageUrl ( string componentAppId, string preAuthCode, string redirectUrl ) : string

获取授权地址

GetJsApiTicket ( string authorizerAccessToken, string type = "jsapi" ) : JsApiTicketResult

文档:https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1421823488&token=&lang=zh_CN 获取调用微信JS接口的临时票据 OPEN

GetJsApiTicketAsync ( string authorizerAccessToken, string type = "jsapi" ) : Task

文档:https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1421823488&token=&lang=zh_CN 【异步方法】获取调用微信JS接口的临时票据 OPEN

GetPreAuthCode ( string componentAppId, string componentAccessToken, int timeOut = Config.TIME_OUT ) : PreAuthCodeResult

获取预授权码

GetPreAuthCodeAsync ( string componentAppId, string componentAccessToken, int timeOut = Config.TIME_OUT ) : Task

【异步方法】获取预授权码

QueryAuth ( string componentAccessToken, string componentAppId, string authorizationCode, int timeOut = Config.TIME_OUT ) : QueryAuthResult

使用授权码换取公众号的授权信息

QueryAuthAsync ( string componentAccessToken, string componentAppId, string authorizationCode, int timeOut = Config.TIME_OUT ) : Task

【异步方法】使用授权码换取公众号的授权信息

SetAuthorizerOption ( string componentAccessToken, string componentAppId, string authorizerAppId, OptionName optionName, int optionValue, int timeOut = Config.TIME_OUT ) : WxJsonResult

设置授权方的选项信息

SetAuthorizerOptionAsync ( string componentAccessToken, string componentAppId, string authorizerAppId, OptionName optionName, int optionValue, int timeOut = Config.TIME_OUT ) : Task

【异步方法】设置授权方的选项信息

메소드 상세

ApiAuthorizerToken() 공개 정적인 메소드

获取(刷新)授权公众号的令牌 由于access_token拥有较短的有效期,当access_token超时后,可以使用refresh_token进行刷新,refresh_token拥有较长的有效期(30天),当refresh_token失效的后,需要用户重新授权。
public static ApiAuthorizerToken ( string componentAccessToken, string componentAppId, string authorizerAppId, string authorizerRefreshToken = null, int timeOut = Config.TIME_OUT ) : RefreshAuthorizerTokenResult
componentAccessToken string
componentAppId string
authorizerAppId string
authorizerRefreshToken string
timeOut int
리턴 RefreshAuthorizerTokenResult

ApiAuthorizerTokenAsync() 공개 정적인 메소드

【异步方法】获取(刷新)授权公众号的令牌 由于access_token拥有较短的有效期,当access_token超时后,可以使用refresh_token进行刷新,refresh_token拥有较长的有效期(30天),当refresh_token失效的后,需要用户重新授权。
public static ApiAuthorizerTokenAsync ( string componentAccessToken, string componentAppId, string authorizerAppId, string authorizerRefreshToken = null, int timeOut = Config.TIME_OUT ) : Task
componentAccessToken string
componentAppId string
authorizerAppId string
authorizerRefreshToken string
timeOut int
리턴 Task

ApiConfirmAuth() 공개 정적인 메소드

确认授权
public static ApiConfirmAuth ( string componentAccessToken, string componentAppId, string authorizerAppid, int funscopeCategoryId, int confirmValue, int timeOut = Config.TIME_OUT ) : WxJsonResult
componentAccessToken string 服务开发方的access_token
componentAppId string 服务开发方的appid
authorizerAppid string 授权code,会在授权成功时返回给第三方平台,详见第三方平台授权流程说明
funscopeCategoryId int 服务开发方的access_token
confirmValue int 服务开发方的access_token
timeOut int 代理请求超时时间(毫秒)
리턴 Senparc.Weixin.Entities.WxJsonResult

ApiConfirmAuthAsync() 공개 정적인 메소드

【异步方法】确认授权
public static ApiConfirmAuthAsync ( string componentAccessToken, string componentAppId, string authorizerAppid, int funscopeCategoryId, int confirmValue, int timeOut = Config.TIME_OUT ) : Task
componentAccessToken string 服务开发方的access_token
componentAppId string 服务开发方的appid
authorizerAppid string 授权code,会在授权成功时返回给第三方平台,详见第三方平台授权流程说明
funscopeCategoryId int 服务开发方的access_token
confirmValue int 服务开发方的access_token
timeOut int 代理请求超时时间(毫秒)
리턴 Task

GetAuthorizerInfo() 공개 정적인 메소드

获取授权方信息 注意:此方法返回的JSON中,authorization_info.authorizer_appid等几个参数通常为空(哪怕公众号有权限)
public static GetAuthorizerInfo ( string componentAccessToken, string componentAppId, string authorizerAppId, int timeOut = Config.TIME_OUT ) : GetAuthorizerInfoResult
componentAccessToken string
componentAppId string
authorizerAppId string
timeOut int
리턴 GetAuthorizerInfoResult

GetAuthorizerInfoAsync() 공개 정적인 메소드

【异步方法】获取授权方信息 注意:此方法返回的JSON中,authorization_info.authorizer_appid等几个参数通常为空(哪怕公众号有权限)
public static GetAuthorizerInfoAsync ( string componentAccessToken, string componentAppId, string authorizerAppId, int timeOut = Config.TIME_OUT ) : Task
componentAccessToken string
componentAppId string
authorizerAppId string
timeOut int
리턴 Task

GetAuthorizerOption() 공개 정적인 메소드

获取授权方的选项设置信息
public static GetAuthorizerOption ( string componentAccessToken, string componentAppId, string authorizerAppId, OptionName optionName, int timeOut = Config.TIME_OUT ) : AuthorizerOptionResult
componentAccessToken string 服务开发方的access_token
componentAppId string 服务开发商的appid
authorizerAppId string 授权公众号appid
optionName OptionName 选项名称
timeOut int 代理请求超时时间(毫秒)
리턴 AuthorizerOptionResult

GetAuthorizerOptionAsync() 공개 정적인 메소드

【异步方法】获取授权方的选项设置信息
public static GetAuthorizerOptionAsync ( string componentAccessToken, string componentAppId, string authorizerAppId, OptionName optionName, int timeOut = Config.TIME_OUT ) : Task
componentAccessToken string 服务开发方的access_token
componentAppId string 服务开发商的appid
authorizerAppId string 授权公众号appid
optionName OptionName 选项名称
timeOut int 代理请求超时时间(毫秒)
리턴 Task

GetComponentAccessToken() 공개 정적인 메소드

获取第三方平台access_token
public static GetComponentAccessToken ( string componentAppId, string componentAppSecret, string componentVerifyTicket, int timeOut = Config.TIME_OUT ) : ComponentAccessTokenResult
componentAppId string 第三方平台appid
componentAppSecret string 第三方平台appsecret
componentVerifyTicket string 微信后台推送的ticket,此ticket会定时推送,具体请见本页末尾的推送说明
timeOut int
리턴 Senparc.Weixin.Open.Entities.ComponentAccessTokenResult

GetComponentAccessTokenAsync() 공개 정적인 메소드

【异步方法】获取第三方平台access_token
public static GetComponentAccessTokenAsync ( string componentAppId, string componentAppSecret, string componentVerifyTicket, int timeOut = Config.TIME_OUT ) : Task
componentAppId string 第三方平台appid
componentAppSecret string 第三方平台appsecret
componentVerifyTicket string 微信后台推送的ticket,此ticket会定时推送,具体请见本页末尾的推送说明
timeOut int
리턴 Task

GetComponentLoginPageUrl() 공개 정적인 메소드

获取授权地址
public static GetComponentLoginPageUrl ( string componentAppId, string preAuthCode, string redirectUrl ) : string
componentAppId string 第三方平台方appid
preAuthCode string 预授权码
redirectUrl string 回调URL
리턴 string

GetJsApiTicket() 공개 정적인 메소드

文档:https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1421823488&token=&lang=zh_CN 获取调用微信JS接口的临时票据 OPEN
public static GetJsApiTicket ( string authorizerAccessToken, string type = "jsapi" ) : JsApiTicketResult
authorizerAccessToken string authorizer_access_token
type string
리턴 Senparc.Weixin.Open.Entities.JsApiTicketResult

GetJsApiTicketAsync() 공개 정적인 메소드

文档:https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1421823488&token=&lang=zh_CN 【异步方法】获取调用微信JS接口的临时票据 OPEN
public static GetJsApiTicketAsync ( string authorizerAccessToken, string type = "jsapi" ) : Task
authorizerAccessToken string authorizer_access_token
type string
리턴 Task

GetPreAuthCode() 공개 정적인 메소드

获取预授权码
public static GetPreAuthCode ( string componentAppId, string componentAccessToken, int timeOut = Config.TIME_OUT ) : PreAuthCodeResult
componentAppId string 第三方平台方appid
componentAccessToken string
timeOut int
리턴 Senparc.Weixin.Open.Entities.PreAuthCodeResult

GetPreAuthCodeAsync() 공개 정적인 메소드

【异步方法】获取预授权码
public static GetPreAuthCodeAsync ( string componentAppId, string componentAccessToken, int timeOut = Config.TIME_OUT ) : Task
componentAppId string 第三方平台方appid
componentAccessToken string
timeOut int
리턴 Task

QueryAuth() 공개 정적인 메소드

使用授权码换取公众号的授权信息
public static QueryAuth ( string componentAccessToken, string componentAppId, string authorizationCode, int timeOut = Config.TIME_OUT ) : QueryAuthResult
componentAccessToken string 服务开发方的access_token
componentAppId string 服务开发方的appid
authorizationCode string 授权code,会在授权成功时返回给第三方平台,详见第三方平台授权流程说明
timeOut int 代理请求超时时间(毫秒)
리턴 QueryAuthResult

QueryAuthAsync() 공개 정적인 메소드

【异步方法】使用授权码换取公众号的授权信息
public static QueryAuthAsync ( string componentAccessToken, string componentAppId, string authorizationCode, int timeOut = Config.TIME_OUT ) : Task
componentAccessToken string 服务开发方的access_token
componentAppId string 服务开发方的appid
authorizationCode string 授权code,会在授权成功时返回给第三方平台,详见第三方平台授权流程说明
timeOut int 代理请求超时时间(毫秒)
리턴 Task

SetAuthorizerOption() 공개 정적인 메소드

设置授权方的选项信息
public static SetAuthorizerOption ( string componentAccessToken, string componentAppId, string authorizerAppId, OptionName optionName, int optionValue, int timeOut = Config.TIME_OUT ) : WxJsonResult
componentAccessToken string 服务开发方的access_token
componentAppId string 服务开发商的appid
authorizerAppId string 授权公众号appid
optionName OptionName 选项名称
optionValue int 设置的选项值
timeOut int 代理请求超时时间(毫秒)
리턴 Senparc.Weixin.Entities.WxJsonResult

SetAuthorizerOptionAsync() 공개 정적인 메소드

【异步方法】设置授权方的选项信息
public static SetAuthorizerOptionAsync ( string componentAccessToken, string componentAppId, string authorizerAppId, OptionName optionName, int optionValue, int timeOut = Config.TIME_OUT ) : Task
componentAccessToken string 服务开发方的access_token
componentAppId string 服务开发商的appid
authorizerAppId string 授权公众号appid
optionName OptionName 选项名称
optionValue int 设置的选项值
timeOut int 代理请求超时时间(毫秒)
리턴 Task