邮件模板列表查询
GET
/api/v2/email/templates
请求参数
Query 参数
type
string
可选
示例值:
RESET_PASSWORD
Header 参数
Authorization
string
必需
示例值:
Bearer token
x-authing-userpool-id
string
用户池 ID
示例值:
59f86b4832eb28071bdd9214
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://core.authing.cn/api/v2/email/templates' \
--header 'Authorization: Bearer token' \
--header 'x-authing-userpool-id: 59f86b4832eb28071bdd9214'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
object
必需
isSystem
boolean
必需
type
string
必需
name
string
必需
subject
string
必需
sender
string
必需
hasURL
boolean
必需
tplEngine
string
必需
content
string
必需
示例
{
"code": 200,
"message": "获取成功",
"data": {
"isSystem": true,
"type": "RESET_PASSWORD",
"name": "重置密码",
"subject": "您正在重置密码,验证码为:{{verify_code}}",
"sender": "系统账户 <official@authing.cn>",
"hasURL": false,
"tplEngine": "handlebar",
"content": "\n<div style=\"padding: 35px;\">\n\t<table cellpadding=\"0\" align=\"center\" style=\"width: 600px; margin: 0px auto; text-align: left; position: relative; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; font-size: 14px; font-family:Microsoft YaHei, SimHei; line-height: 1.5; box-shadow: rgb(153, 153, 153) 0px 0px 5px; border-collapse: collapse; background-position: initial initial; background-repeat: initial initial;background:#fff;\">\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<th valign=\"middle\" style=\"height: 25px; line-height: 25px; padding: 15px 35px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgba(18, 24, 37, 0.87); background-color: #484f60; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;\">\n\t\t\t\t\t<font face=\"Microsoft YaHei\" size=\"5\" style=\"color: rgb(255, 255, 255); \">{{client_name}} </font>\n\t\t\t\t</th>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t<div style=\"padding:25px 35px 40px; background-color:#fff;\">\n\t\t\t\t\t\t<h2 style=\"margin: 5px 0px; \">\n\t\t\t\t\t\t\t<font color=\"#333333\" style=\"line-height: 20px; \">\n\t\t\t\t\t\t\t\t<font style=\"line-height: 22px; \" size=\"4\">亲爱的用户:{{user_email}}</font>\n\t\t\t\t\t\t\t</font>\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t<p>您正在重置密码, 您的验证码为:<font style=\"color: #4a8db8\">{{verify_code}}</font>, 请尽快验证并保管好验证码。</p>\n\t\t\t\t\t\t<p align=\"right\">{{client_name}} 官方团队</p>\n\t\t\t\t\t\t<p align=\"right\">{{time}}</p>\n\t\t\t\t\t</div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</tbody>\n\t</table>\n</div>"
}
}
修改于 2022-01-14 11:58:33