Appearance
修改好友备注
修改当前微信实例中指定好友的备注名。
接口地址: POST /modifyRemark
请求参数
| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
wId | 是 | string | 登录实例标识 |
wcId | 是 | string | 好友微信 ID |
remark | 是 | string | 新备注名 |
请求示例
http
POST {BASE_URL}/modifyRemark
Authorization: Bearer <你的调用凭证>
Content-Type: application/json
{
"wId": "0000016f-a2aa-9089-0001-32dbe7c94132",
"wcId": "wxid_ao4ziqc2g9b922",
"remark": "张三-已成交"
}bash
curl -X POST '{BASE_URL}/modifyRemark' \
-H 'Authorization: Bearer <你的调用凭证>' \
-H 'Content-Type: application/json' \
--data-raw '{
"wId": "0000016f-a2aa-9089-0001-32dbe7c94132",
"wcId": "wxid_ao4ziqc2g9b922",
"remark": "张三-已成交"
}'python
import requests
url = "{BASE_URL}/modifyRemark"
headers = {"Authorization": "Bearer <你的调用凭证>", "Content-Type": "application/json"}
body = """{
"wId": "0000016f-a2aa-9089-0001-32dbe7c94132",
"wcId": "wxid_ao4ziqc2g9b922",
"remark": "张三-已成交"
}"""
resp = requests.post(url, headers=headers, data=body.encode("utf-8"))
print(resp.text)java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String url = "{BASE_URL}/modifyRemark";
String body = "{\n" +
" \"wId\": \"0000016f-a2aa-9089-0001-32dbe7c94132\",\n" +
" \"wcId\": \"wxid_ao4ziqc2g9b922\",\n" +
" \"remark\": \"张三-已成交\"\n" +
"}";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder(URI.create(url))
.header("Authorization", "Bearer <你的调用凭证>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());php
<?php
$url = '{BASE_URL}/modifyRemark';
$body = <<<'JSON'
{
"wId": "0000016f-a2aa-9089-0001-32dbe7c94132",
"wcId": "wxid_ao4ziqc2g9b922",
"remark": "张三-已成交"
}
JSON;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer <你的调用凭证>',
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;成功响应
json
{
"code": "1000",
"message": "成功",
"data": null
}错误响应
json
{
"code": "1001",
"message": "失败",
"data": null
}响应参数
| 参数名 | 类型 | 说明 |
|---|---|---|
code | string | 1000 成功;其他值都是失败,通常是 1001 |
message | string | 反馈信息 |
data | null | 成功时通常为空 |