conversationCreate
mutation
需要 unauthenticated_write_message 权限点。
接口访问需要令牌,具体如何获取令牌参考:身份认证。
在聊天应用或消息系统中创建新的会话。调用本接口前需确保已通过 thirdUserCreate 接口创建第三方用户。
Example
创建会话
Code
mutation {
conversationCreate(input: { userId: "gid://shopline/ThirdUser/******5235111" }) {
userErrors {
code
field
message
}
conversation {
id
}
}
}
Response
{
"conversationCreate": {
"conversation": {
"id": "gid://shopline/Conversation/******403588"
},
"userErrors": []
}
}
这篇文章对你有帮助吗?