xiaoyong931011
2023-07-26 e96f7638e74cc24c075636c37e7ca5e713cd8742
src/test/java/cc/mrbird/febs/ProfitTest.java
@@ -136,11 +136,15 @@
    @Test
    public void getWeChatAccessToken() {
        String appId = "wx5cc58f796224af61";
        String appSecret = "71403646f666f9b9dca308d4f357765c";
        // 第三方用户唯一凭证
        String appId = "wx052716b1a388b13c";
        // 第三方用户唯一凭证密钥
        String appSecret = "a217fd6bd36b4939e29a052fd5ba6984";
        String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + appId + "&secret=" + appSecret;
        String jsonStr = restTemplate.getForObject(url, String.class);
        /**
         * 返回结果
         * {"access_token":"ACCESS_TOKEN","expires_in":7200}