注册云信IM账号
POST
/im/v2/accounts
请求参数
Header 参数
AppKey
string
必需
默认值:
{{AppKey}}
X-custom-traceid
string
可选
默认值:
{% mock 'uuid' %}
Nonce
string
必需
默认值:
{{Nonce}}
CurTime
string
必需
默认值:
{{CurTime}}
CheckSum
string
必需
默认值:
{{CheckSum}}
Body 参数application/json
account_id
string
账号Id
>= 1 字符<= 32 字符
token
string
账号登陆密钥
<= 128 字符
configuration
object
账户配置项
enabled
boolean
账号禁用标记
默认值:
true
p2p_chat_banned
boolean
单聊禁言标记
默认值:
false
team_chat_banned
boolean
群聊禁言标记
默认值:
false
chatroom_chat_banned
boolean
聊天室禁言标记
默认值:
false
qchat_chat_banned
boolean
圈组禁言标记
默认值:
false
push_enabled_when_desktop_online
boolean
桌面端在线时是否关闭移动端推送
默认值:
false
user_information
object
必需
name
string
昵称
<= 64 字符
avatar
string
头像URL地址
需要通过反垃圾审核。
上传头像图片请参考 。
<= 1024 字符
示例值:
https://netease/xxx.png
sign
string
签名
需要通过反垃圾审核。
email
string
邮箱地址
可设置为空字符串。
需要通过反垃圾审核。
<= 64 字符
示例值:
zhangsan@xx.com
birthday
string
生日
需要通过反垃圾审核。
<= 16 字符
mobile
string
手机号码
非中国大陆手机号码需要填写国家代码(如美国:+1-xxxxxxxxxx)或地区代码(如香港:+852-xxxxxxxx)。
<= 32 字符
gender
enum<integer>
性别
枚举值:
012
默认值:
0
extension
string
扩展信息
长度上限 1024 个字符。
需要通过反垃圾审核。
<= 1024 字符
antispam_configuration
object
必需
enabled
boolean
必需
business_id_map
array [object {2}]
必需
示例
{
"account_id": "48",
"token": "aliqua exercitation occaecat Excepteur quis",
"configuration": {
"enabled": true,
"p2p_chat_banned": false,
"team_chat_banned": false,
"chatroom_chat_banned": false,
"qchat_chat_banned": false,
"push_enabled_when_desktop_online": false
},
"user_information": {
"name": "马示思难",
"avatar": "http://dummyimage.com/100x100",
"sign": "dolore reprehenderit laboris",
"email": "l.bxyuulbt@qq.com",
"birthday": "1974-12-27",
"mobile": "13355645597",
"gender": 0,
"extension": "consequat ea"
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://open.yunxinapi.com/im/v2/accounts' \
--header 'AppKey;' \
--header 'X-custom-traceid: {% mock '\''uuid'\'' %}' \
--header 'Nonce;' \
--header 'CurTime;' \
--header 'CheckSum;' \
--header 'Content-Type: application/json' \
--data-raw '{
"account_id": "48",
"token": "aliqua exercitation occaecat Excepteur quis",
"configuration": {
"enabled": true,
"p2p_chat_banned": false,
"team_chat_banned": false,
"chatroom_chat_banned": false,
"qchat_chat_banned": false,
"push_enabled_when_desktop_online": false
},
"user_information": {
"name": "马示思难",
"avatar": "http://dummyimage.com/100x100",
"sign": "dolore reprehenderit laboris",
"email": "l.bxyuulbt@qq.com",
"birthday": "1974-12-27",
"mobile": "13355645597",
"gender": 0,
"extension": "consequat ea"
}
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
msg
string
必需
data
object
必需
account_id
string
账号Id
>= 1 字符<= 32 字符
token
string
账号登陆密钥
<= 128 字符
configuration
object
账户配置项
user_information
object
必需
示例
{
"code": 200,
"msg": "success.",
"data": {
"account_id": "6",
"token": "fafsda232@623#*42",
"configuration": {
"enabled": false,
"p2p_chat_banned": false,
"team_chat_banned": false,
"chatroom_chat_banned": true,
"qchat_chat_banned": false,
"push_enabled_when_desktop_online": true
},
"user_information": {
"name": "张三",
"avatar": "http://dummyimage.com/100x100",
"sign": "in aute nulla Lorem",
"email": "y.amene@qq.com",
"birthday": "2008-11-02",
"mobile": "13813888888",
"gender": 1,
"extension": "est eiusmod"
}
}
}
🟢200请求参数错误
🟢200服务器错误
修改于 2024-12-25 08:33:49