我可以使用以下代码在Glip上创建帖子:
$AddPostHeader = @{'Content-Type' = 'application/json';'Authorization'='Bearer ' + $token}
$AddPostURL = 'https://platform.devtest.ringcentral.com/restapi/v1.0/glip/chats/' + $selectedGroup + '/posts'
$AddPostBody = @{'type' = 'TextMessage'; 'text' = 'This post was written from Powershell'}
$AddPostBody = ConvertTo-Json $AddPostBody
$NewPost = Invoke-RestMethod -h $AddPostHeader -Body $AddPostBody $AddPostURL -Method 'POST'
$AddPostURL
$NewPost
但是如何创建任务?
这说我可以:https://medium.com/ringcentral-developers/automating-team-productivity-with-glip-748a05aa32e9
我引用https://developers.ringcentral.com/api-reference时没有任何运气吗?帖子有“类型”选项吗?
答案 0 :(得分:0)
API参考现在具有一组RingCentral Tasks API。创建任务API在此处:
使用HTTP使用此API的快速示例如下:
必填字段:
chatId
(路径)subject
(正文)任务名称assignees
(正文)personId
(受让人)示例请求:
POST https://platform.ringcentral.com/restapi/v1.0/glip/chats/{chatId}/tasks
Authorization: Bearer <myToken>
Content-Type: application/json
{
"subject": "My New Task",
"assignees": [{"id":"123"}]
}