diff --git a/src/OfficialAccount/TemplateMessage/Client.php b/src/OfficialAccount/TemplateMessage/Client.php index 475be1b32..deb6b8757 100644 --- a/src/OfficialAccount/TemplateMessage/Client.php +++ b/src/OfficialAccount/TemplateMessage/Client.php @@ -88,10 +88,14 @@ public function getIndustry() * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException * @throws \GuzzleHttp\Exception\GuzzleException */ - public function addTemplate($shortId) + public function addTemplate($shortId, $keywordList = []) { $params = ['template_id_short' => $shortId]; + if ($keywordList) { + $params['keyword_name_list'] = $keywordList; + } + return $this->httpPostJson('cgi-bin/template/api_add_template', $params); }