1
0
mirror of synced 2026-03-23 21:18:58 +08:00

🆕 #3895 【开放平台】增加第三方平台「修改试用小程序名称(昵称)」接口实现

This commit is contained in:
liwenzheng-git
2026-03-03 12:02:37 +08:00
committed by GitHub
parent 5099347f65
commit 3980017478
2 changed files with 23 additions and 0 deletions

View File

@@ -129,6 +129,11 @@ public interface WxOpenMaService extends WxMaService {
*/
String API_VERIFY_BETA_WEAPP = "https://api.weixin.qq.com/wxa/verifybetaweapp";
/**
* 3.1 修改试用小程序名称
*/
String API_SET_BETA_WEAPP_NICKNAME = "https://api.weixin.qq.com/wxa/setbetaweappnickname";
/**
* 4. 获取授权小程序帐号的可选类目
*/
@@ -518,6 +523,16 @@ public interface WxOpenMaService extends WxMaService {
*/
WxOpenResult verifyBetaWeapp(WxOpenMaVerifyBetaWeappMessage verifyBetaWeappMessage) throws WxErrorException;
/**
* 设置小程序昵称
*
* @param name 小程序名称,昵称半自动设定,强制后缀“的体验小程序”。且该参数会进行关键字检查,如果命中品牌关键字则会报错。
* 如遇到品牌大客户要用试用小程序,建议用户先换个名字,认证后再修改成品牌名
* @return the wx open result
* @throws WxErrorException the wx error exception
*/
WxOpenResult setBetaWeappNickName(String name) throws WxErrorException;
/**
* 获取授权小程序帐号的可选类目
* <p>

View File

@@ -274,6 +274,14 @@ public class WxOpenMaServiceImpl extends WxMaServiceImpl implements WxOpenMaServ
return WxMaGsonBuilder.create().fromJson(response, WxOpenResult.class);
}
@Override
public WxOpenResult setBetaWeappNickName(String name) throws WxErrorException {
JsonObject params = new JsonObject();
params.addProperty("name", name);
String response = post(API_SET_BETA_WEAPP_NICKNAME, GSON.toJson(params));
return WxMaGsonBuilder.create().fromJson(response, WxOpenResult.class);
}
@Override
public WxOpenMaCategoryListResult getCategoryList() throws WxErrorException {
String response = get(API_GET_CATEGORY, null);