public interface WxMaInternetService
【小程序-服务端-网络】网络相关接口. 文档地址:https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/internet/internet.getUserEncryptKey.html
限定符和类型 | 方法和说明 |
---|---|
WxMaInternetResponse |
getUserEncryptKey(String openid,
String sessionKey)
获取用户encryptKey。
|
WxMaInternetResponse |
getUserEncryptKey(String openid,
String signature,
String sigMethod)
已过时。
|
@Deprecated WxMaInternetResponse getUserEncryptKey(String openid, String signature, String sigMethod) throws WxErrorException
获取用户encryptKey。 会获取用户最近3次的key,每个key的存活时间为3600s。 文档地址:https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/internet/internet.getUserEncryptKey.html 接口地址:POST https://api.weixin.qq.com/wxa/business/getuserencryptkey?access_token=ACCESS_TOKEN&openid=OPENID&signature=SIGNATURE&sig_method=hmac_sha256
openid
- 用户的openidsignature
- 用sessionkey对空字符串签名得到的结果sigMethod
- 签名方法,只支持 hmac_sha256
WxMaInternetResponse
WxErrorException
WxMaInternetResponse getUserEncryptKey(String openid, String sessionKey) throws WxErrorException
获取用户encryptKey。
openid
- 用户的openidsessionKey
- 用户的sessionKey
WxMaInternetResponse
WxErrorException
Copyright © 2024. All rights reserved.