- 快速入门
- 开发指南
- 通讯录管理
- 客户联系
- 微信客服
- 家校沟通
- 应用管理
- 消息推送
- OA
- 效率工具
- 企业支付
- 上下游
- 会话内容存档
- 家校应用
- 政民沟通
空间管理 新建空间
POST
http://127.0.0.1/cgi-bin/wedrive/space_create
企业内部开发/效率工具/微盘
最后修改时间:2022-08-30 03:03:35
责任人:未设置
文档ID: 26911
原文档地址:
https://open.work.weixin.qq.com/api/doc/90000/90135/93655
请求参数
Query 参数
access_token
string
调用接口凭证
示例值:
{{accesstoken}}
Body 参数application/json
userid
string
必需
space_name
string
空间标题
auth_info
array [object {4}]
空间其他成员信息
type
integer
可选
userid
string
可选
auth
integer
可选
departmentid
string
可选
示例
{
"userid": "USERID",
"space_name": "SPACE_NAME",
"auth_info": [
{
"type": 1,
"userid": "USERID",
"auth": 2
},
{
"type": 2,
"departmentid": "DEPARTMENTID",
"auth": 1
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'http://127.0.0.1/cgi-bin/wedrive/space_create?access_token={{accesstoken}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"userid": "USERID",
"space_name": "SPACE_NAME",
"auth_info": [
{
"type": 1,
"userid": "USERID",
"auth": 2
},
{
"type": 2,
"departmentid": "DEPARTMENTID",
"auth": 1
}
]
}'
返回响应
🟢200成功
application/json
Body
errcode
integer
必需
errmsg
string
必需
spaceid
string
空间id
示例
{
"errcode": 0,
"errmsg": "ok",
"spaceid": "SPACEID"
}
