dingtalk.oapi.cspace.get_custom_space (获取企业下的自定义空间)

获取企业下的自定义空间

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
domain String 可选 aaa 企业调用时传入,需要为10个字节以内的字符串,仅可包含字母和数字,大小写不敏感
agent_id String 可选 123 ISV调用时传入,微应用agentId

响应参数

名称 类型 示例值 描述
spaceid String xxx spaceid
errmsg String ok errmsg
errcode Number 0 errcode

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/cspace/get_custom_space");
OapiCspaceGetCustomSpaceRequest req = new OapiCspaceGetCustomSpaceRequest();
req.setDomain("aaa");
req.setAgentId("123");
req.setHttpMethod("GET");
OapiCspaceGetCustomSpaceResponse rsp = client.execute(req, access_token);
System.out.println(rsp.getBody());

响应示例

  • JSON示例
{
    "spaceid":"xxx",
    "errmsg":"ok",
    "errcode":0
}

异常示例

  • JSON示例
{
	"error_response":{
		"msg":"Remote service error",
		"code":50,
		"sub_msg":"非法参数",
		"sub_code":"isv.invalid-parameter"
	}
}

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部