API 呼び出し説明
本 API では、送信から 24 時間以内の業務通知のみ送信取消できます。権限
サーバー API はアプリ単位で権限が付与されます。アプリ作成時に、システムによりメッセージ通知権限がデフォルトで追加されています。基本情報
HTTP メソッド:POST リクエスト URL:リクエスト
| 基本情報 | |
|---|---|
| HTTP URL | https://api.dingtalk.io/topapi/message/corpconversation/recall |
| HTTP Method | POST |
| サポートするアプリタイプ | appType-社内アプリappType-サードパーティ社内アプリ |
| 権限要件 | permission-qyapi_base-企業 API 呼び出し時に必要な基本権限 |
クエリパラメータ
| 名前 | タイプ | 必須 | 例 | 説明 |
|---|---|---|---|---|
| access_token | String | 必須 | bE74xxxx | 本 API を呼び出すためのアプリ認証情報。 - 社内アプリの場合、社内アプリの access_token 取得 API より取得します。 - サードパーティ社内アプリの場合、サードパーティ企業の access_token 取得 API より取得します。 |
リクエストボディ
リクエスト例
curl -X POST "https://api.dingtalk.io/topapi/message/corpconversation/recall" \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'access_token=404080xxxx4ab30' \
-d 'agent_id=1000' \
-d 'msg_task_id=2000'
DingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/message/corpconversation/recall");
OapiMessageCorpconversationRecallRequest req = new OapiMessageCorpconversationRecallRequest();
req.setAgentId(1000L);
req.setMsgTaskId(2000L);
OapiMessageCorpconversationRecallResponse rsp = client.execute(req, accessToken);
System.out.println(rsp.getBody());
import dingtalk.api
req=dingtalk.api.OapiMessageCorpconversationRecallRequest("https://api.dingtalk.io/topapi/message/corpconversation/recall")
req.agent_id=1000
req.msg_task_id=2000
try:
resp= req.getResponse(access_token)
print(resp)
except Exception,e:
print(e)
include "TopSdk.php";
date_default_timezone_set('Asia/Shanghai');
$c = new DingTalkClient(DingTalkConstant::$CALL_TYPE_OAPI, DingTalkConstant::$METHOD_POST , DingTalkConstant::$FORMAT_JSON);
$req = new OapiMessageCorpconversationRecallRequest;
$req->setAgentId("1000");
$req->setMsgTaskId("2000");
$resp = $c->execute($req, $access_token, "https://api.dingtalk.io/topapi/message/corpconversation/recall");
IDingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/message/corpconversation/recall");
OapiMessageCorpconversationRecallRequest req = new OapiMessageCorpconversationRecallRequest();
req.AgentId = 1000L;
req.MsgTaskId = 2000L;
OapiMessageCorpconversationRecallResponse rsp = client.Execute(req, access_token);
Console.WriteLine(rsp.Body);
レスポンス
レスポンスボディ
| 名前 | タイプ | 例 | 説明 |
|---|---|---|---|
| errmsg | String | ok | リターンコードの説明。 |
| errcode | Number | 0 | リターンコード。 |
レスポンスボディの例
{
"errcode":0,
"errmsg":"ok"
}
エラーコード
本 API の呼び出しでエラーが発生した場合、グローバルエラーコードドキュメントでエラーメッセージから解決方法を検索できます。| エラーコード(errorcode) | エラーメッセージ(errmsg) | 解決方法 |
|---|---|---|
| 400002 | agentId not valid or taskId not valid | agentId または taskId が正しいか確認してください |
| 500 | システムエラー | 不明なシステムエラーが発生しました |