通过yammer rest api发布Yammer赞美

时间:2018-02-21 11:44:00

标签: rest yammer

当我尝试通过Yammer REST API发布Yammer赞美时,我遇到了问题。

在开始编写代码之前,我尝试使用Postman发布Yammer赞美。 当我尝试使用form-data选项时,一切都很好,并且成功创建了赞美 from-data screenshot。 然后我尝试使用原始数据(JSON)来发表赞美。 头:

授权:持票人#Token;

yammer-capabilities:外部消息传递,外部群组(我尝试过“外部消息传递,解析了body-only2,用户侧边栏,外部群组”);

内容类型:application / json

{
    "body": "test body",
    "group_id": #groupId,
    "message_type": "praise",
    "title": "test title",
    "praise": {
        "comment": "test comment",
        "icon": "thumbsup",
        "praised_user_ids": [#PraisedUserId]
    }
}

这就是我的回应:

{
    "body": [
        "Please include a message"
    ],
    "code": "body_blank"
}

有人可以帮我吗?通过Yammer REST API创建表扬的JSON应该是什么

1 个答案:

答案 0 :(得分:0)

再添加一个参数 skip_body_notification 作为 true flot line error

enter image description here