企业邮局相关 - API文档

修改管理密码

/Mail/Password

API分类 企业邮局相关 请求方法 POST

API简介

修改邮局的管理员密码。

请求参数

名称 必须 说明
ApiKey API请求时必须提供的密钥,请和管理员联系索取
Password 登录朝暮数据用户管理的密码
Domain 邮局域名,如abc.com
MailPassword 邮局管理密码

注:参数名称不区分大小写。

请求示例

BASE_URL/Mail/Password

以下参数请用 POST 方式提交到 Form Data 中。

  • ApiKey=testApi
  • Password=testPassword
  • Domain=mailabc.com
  • MailPassword=newPassword

输出结果

{
    success: true
    info: "邮局密码修改成功"
}

代码示例

using RestSharp; //使用第三方组件RestSharp

var client = new RestClient();
client.BaseUrl = new Uri("http://BASE_URL");

var request = new RestRequest("/Mail/Password",Method.POST);
request.AddParameter("ApiKey", "testApi");
request.AddParameter("Password", "testPassword");
request.AddParameter("Domain", "mailabc.com");
request.AddParameter("MailPassword", "newPassword");

var response = client.Execute(request);
string result = response.Content;
$url = 'http://BASE_URL/Mail/Password';
$param = array(
  'ApiKey' => 'testApi',
  'Password' => 'testPassword',
  'Domain' => 'mailabc.com'    
  'MailPassword' => 'newPassword'    
);
$data = http_build_query($param);

$options = array(
            'http' => array(
                'method' => 'POST',
                'header' => 'Content-Type: application/x-www-form-urlencoded',
                'content' => $data
        ));
$context = stream_context_create($options);
$result = file_get_contents($url, FILE_TEXT, $context);
?>
'API请求的URL地址
const url = "http://BASE_URL/Mail/Password"

'API请求的提交数据
postData = "ApiKey=testApi&Password=testPassword&Domain=mailabc.com&MailPassword=newPassword"

'执行HTTP请求
Set http = Server.CreateObject("MSXML2.ServerXMLHTTP")
http.Open "POST", url, False
http.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
http.Send

'获取并分析结果
result = http.responseText