重置成员信息
curl --request POST \
--url 'https://api.flashcat.cloud/member/info/reset?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"member_id": 2476444212131,
"updates": {
"member_name": "Alice Chen",
"locale": "zh-CN",
"time_zone": "Asia/Shanghai"
}
}
'import requests
url = "https://api.flashcat.cloud/member/info/reset?app_key="
payload = {
"member_id": 2476444212131,
"updates": {
"member_name": "Alice Chen",
"locale": "zh-CN",
"time_zone": "Asia/Shanghai"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
member_id: 2476444212131,
updates: {member_name: 'Alice Chen', locale: 'zh-CN', time_zone: 'Asia/Shanghai'}
})
};
fetch('https://api.flashcat.cloud/member/info/reset?app_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flashcat.cloud/member/info/reset?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'member_id' => 2476444212131,
'updates' => [
'member_name' => 'Alice Chen',
'locale' => 'zh-CN',
'time_zone' => 'Asia/Shanghai'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flashcat.cloud/member/info/reset?app_key="
payload := strings.NewReader("{\n \"member_id\": 2476444212131,\n \"updates\": {\n \"member_name\": \"Alice Chen\",\n \"locale\": \"zh-CN\",\n \"time_zone\": \"Asia/Shanghai\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flashcat.cloud/member/info/reset?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"member_id\": 2476444212131,\n \"updates\": {\n \"member_name\": \"Alice Chen\",\n \"locale\": \"zh-CN\",\n \"time_zone\": \"Asia/Shanghai\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/member/info/reset?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"member_id\": 2476444212131,\n \"updates\": {\n \"member_name\": \"Alice Chen\",\n \"locale\": \"zh-CN\",\n \"time_zone\": \"Asia/Shanghai\"\n }\n}"
response = http.request(request)
puts response.read_body{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"data": {}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InvalidParameter",
"message": "The specified parameter is not valid."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "RequestTooFrequently",
"message": "Request too frequently."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InternalError",
"message": "We encountered an internal error, and it has been reported. Please try again later."
}
}成员管理
重置成员信息
通过成员标识定位成员,并重置指定资料字段。
POST
/
member
/
info
/
reset
重置成员信息
curl --request POST \
--url 'https://api.flashcat.cloud/member/info/reset?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"member_id": 2476444212131,
"updates": {
"member_name": "Alice Chen",
"locale": "zh-CN",
"time_zone": "Asia/Shanghai"
}
}
'import requests
url = "https://api.flashcat.cloud/member/info/reset?app_key="
payload = {
"member_id": 2476444212131,
"updates": {
"member_name": "Alice Chen",
"locale": "zh-CN",
"time_zone": "Asia/Shanghai"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
member_id: 2476444212131,
updates: {member_name: 'Alice Chen', locale: 'zh-CN', time_zone: 'Asia/Shanghai'}
})
};
fetch('https://api.flashcat.cloud/member/info/reset?app_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flashcat.cloud/member/info/reset?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'member_id' => 2476444212131,
'updates' => [
'member_name' => 'Alice Chen',
'locale' => 'zh-CN',
'time_zone' => 'Asia/Shanghai'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flashcat.cloud/member/info/reset?app_key="
payload := strings.NewReader("{\n \"member_id\": 2476444212131,\n \"updates\": {\n \"member_name\": \"Alice Chen\",\n \"locale\": \"zh-CN\",\n \"time_zone\": \"Asia/Shanghai\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flashcat.cloud/member/info/reset?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"member_id\": 2476444212131,\n \"updates\": {\n \"member_name\": \"Alice Chen\",\n \"locale\": \"zh-CN\",\n \"time_zone\": \"Asia/Shanghai\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/member/info/reset?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"member_id\": 2476444212131,\n \"updates\": {\n \"member_name\": \"Alice Chen\",\n \"locale\": \"zh-CN\",\n \"time_zone\": \"Asia/Shanghai\"\n }\n}"
response = http.request(request)
puts response.read_body{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"data": {}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InvalidParameter",
"message": "The specified parameter is not valid."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "RequestTooFrequently",
"message": "Request too frequently."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InternalError",
"message": "We encountered an internal error, and it has been reported. Please try again later."
}
}限制说明
| 项目 | 说明 |
|---|---|
| 速率限制 | 每个账户 300 次/分钟;20 次/秒 |
| 权限要求 | 无 —— 持有有效的 app_key 即可调用 |
使用说明
- 使用
member_id、member_name、email、phone或ref_id中任一字段定位成员;如果同时传多个字段,服务端按上述顺序匹配。 updates.country_code为 ISO 3166-1 alpha-2 地区代码(如 “CN”、“US”)。它是独立可更新字段:无需同时传updates.phone,即使手机号不变也会写入新的地区代码;显式传空字符串会被拒绝(400)。- 当
updates.phone不带 ”+” 前缀时,按updates.country_code作为地区提示解析;未传时依次回退到成员已存的地区代码、默认值 “CN”。“86” 等数字电话区号仅在解析场景兼容,存储值一律为 ISO 地区代码。 - 顶层的
country_code仅作为定位用phone的解析提示,不会被存储。 updates承载要写入的新资料,支持member_name、password、phone、country_code、email、avatar、locale、time_zone、ref_id。- 由 SSO 托管且不可编辑的成员不能通过此接口修改。
updates至少要带一个字段;所有字段都不传的空对象会被拒绝。
授权
在 Flashduty 控制台 账户 → APP Key 中签发的 app_key。调用任何公开 API 时都必须携带。它等同于所属账户的身份凭证,请妥善保管。
请求体
application/json
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
重置成员信息请求。外层字段用于定位成员,updates 用于传入要写入的新资料。
用于定位成员的成员 ID。
要写入的成员资料新值,至少包含一个字段。
Show child attributes
Show child attributes
用于定位成员的成员名称。
用于定位成员的邮箱地址。
用于定位成员的手机号;如不是 E.164 格式,可同时传 country_code。
当 phone 不带 "+" 前缀时的解析地区提示 —— ISO 3166-1 alpha-2 地区代码(如 "CN",未传时默认 "CN")。此解析场景仍兼容 "86" 等数字电话区号。
用于定位成员的外部引用 ID。
传 api 可将更新后的手机号或邮箱标记为已验证。仅在账户关闭成员邀请时生效,其他取值均被忽略。
此页面对您有帮助吗?