POST Praise via Yammer API

%3CLINGO-SUB%20id%3D%22lingo-sub-162150%22%20slang%3D%22en-US%22%3EPOST%20Praise%20via%20Yammer%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-162150%22%20slang%3D%22en-US%22%3E%3CP%3EI%20faced%20with%20issue%20when%20i'm%20trying%20to%20post%20praise%20in%20Yammer%20group%20via%20Yammer%20rest%20api.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHeaders%3A%3CBR%20%2F%3EAuthorization%3A%20Bearer%20%23Token%3B%3CBR%20%2F%3Eyammer-capabilities%3A%26nbsp%3B%3CSPAN%3Eexternal-messaging%2Cexternal-groups(and%20i've%20tried%20%22external-messaging%2Cparsed-body-only2%2Cuser-sidebar%2Cexternal-groups%22)%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EContent-Type%3A%20application%2Fjson%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHere%20is%20JSON%20that%20i'm%20trying%20to%20send%3C%2FP%3E%0A%3CPRE%3E%7B%0A%20%20%20%20%22body%22%3A%20%22test%20body%22%2C%0A%20%22group_id%22%3A%20%23groupId%2C%0A%20%22message_type%22%3A%20%22praise%22%2C%0A%20%22title%22%3A%20%22test%20title%22%2C%0A%20%22praise%22%3A%20%7B%0A%20%20%22comment%22%3A%20%22test%20comment%22%2C%0A%20%20%22icon%22%3A%20%22thumbsup%22%2C%0A%20%20%22praised_user_ids%22%3A%20%5B%23PraisedUserId%5D%0A%20%7D%0A%7D%3C%2FPRE%3E%0A%3CP%3EAnd%20that%20is%20my%20response%3A%3C%2FP%3E%0A%3CPRE%3E%7B%0A%20%20%20%20%22body%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%22Please%20include%20a%20message%22%0A%20%20%20%20%5D%2C%0A%20%20%20%20%22code%22%3A%20%22body_blank%22%0A%7D%3C%2FPRE%3E%0A%3CP%3EExplain%20me%20please%20what%20did%20i%20do%20wrong%20and%20finally%20how%20can%20i%20achieve%20my%20goal%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-162150%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAPI%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EREST%20API%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EYammer%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-274339%22%20slang%3D%22en-US%22%3ERe%3A%20POST%20Praise%20via%20Yammer%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-274339%22%20slang%3D%22en-US%22%3E%3CP%3EI%20don't%20know%20still%20it%20will%20be%20useful%20for%20you%2C%20but%20I%20tried%20with%20param%20%3CSTRONG%3Eskip_body_notification%3C%2FSTRONG%3E%20as%20%3CSTRONG%3Etrue%3C%2FSTRONG%3E.%20It's%20worked%20and%20it%20'll%20skip%20the%20body%20part.%3C%2FP%3E%3CP%3EBut%2C%20even%20am%20looking%20how%20to%20add%20users%20email%20id%20instead%20of%20user's%20yammer%20id.%20Every%20time%20I%20can't%20call%20one%20more%20API%20to%20get%20user-id%26nbsp%3Bbefore%20I%20post%20Praise.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F57548i6EE1357C1FBA2DEA%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22praise.png%22%20title%3D%22praise.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-169489%22%20slang%3D%22en-US%22%3ERe%3A%20POST%20Praise%20via%20Yammer%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-169489%22%20slang%3D%22en-US%22%3E%3CP%3EI'd%20like%20to%20know%20if%20this%20is%20possible%20as%20well.%26nbsp%3B%20We%20are%20looking%20at%20modernizing%20an%20app%20which%20currently%20has%20this%20capability%20within%20SharePoint%20activity%20feeds%20(on-premise).%26nbsp%3B%20A%20way%20to%20make%20this%20work%20within%20Yammer%20would%20be%20helpful.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1010625%22%20slang%3D%22en-US%22%3ERe%3A%20POST%20Praise%20via%20Yammer%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1010625%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F67932%22%20target%3D%22_blank%22%3E%40praveen%20rengarajan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUsing%20yammer%20rest%20API%20as%20mentioned%20in%20above%20conversations%20%2C%20posting%20praise%20in%20Yammer%20group%20.%20The%20response%20what%20I%20am%20getting%20is%26nbsp%3B%20%3CSTRONG%3E500%20Internal%20Server%20Error.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJSON%20that%20i'm%20trying%20to%20send%3C%2FP%3E%3CTABLE%20border%3D%221%22%3E%3CTBODY%3E%3CTR%3E%3CTD%3E%7B%3CBR%20%2F%3E%22body%22%3A%20%22test%20body%22%2C%3CBR%20%2F%3E%22group_id%22%3A%20%2212107481088%22%2C%3CBR%20%2F%3E%22message_type%22%3A%20%22praise%22%2C%3CBR%20%2F%3E%22title%22%3A%20%22title%22%2C%3CBR%20%2F%3E%22praise%22%3A%20%7B%3CBR%20%2F%3E%22comment%22%3A%20%22test%20comment%22%2C%3CBR%20%2F%3E%22icon%22%3A%20%22thumbsup%22%2C%3CBR%20%2F%3E%22praised_user_ids%22%3A%20%5B1548606417%2C120248147968%5D%3CBR%20%2F%3E%7D%2C%3CBR%20%2F%3E%22skip_body_notifications%22%20%3A%20%22true%22%3CBR%20%2F%3E%7D%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHeaders%3C%2FP%3E%3CP%3EAuthorization%3A%20Bearer%20%23Token%3B%3CBR%20%2F%3EContent-Type%3A%20application%2Fjson%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20anybody%20help%20me%20out%20to%20solve%20this%20issue%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F157355i27126B29A27183D3%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_1.png%22%20title%3D%22clipboard_image_1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

I faced with issue when i'm trying to post praise in Yammer group via Yammer rest api.

 

Headers:
Authorization: Bearer #Token;
yammer-capabilities: external-messaging,external-groups(and i've tried "external-messaging,parsed-body-only2,user-sidebar,external-groups");

Content-Type: application/json

 

Here is JSON that i'm trying to send

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

And that is my response:

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

Explain me please what did i do wrong and finally how can i achieve my goal?

3 Replies

I'd like to know if this is possible as well.  We are looking at modernizing an app which currently has this capability within SharePoint activity feeds (on-premise).  A way to make this work within Yammer would be helpful.

I don't know still it will be useful for you, but I tried with param skip_body_notification as true. It's worked and it 'll skip the body part.

But, even am looking how to add users email id instead of user's yammer id. Every time I can't call one more API to get user-id before I post Praise. 

praise.png

@praveen rengarajan 

 

Using yammer rest API as mentioned in above conversations , posting praise in Yammer group . The response what I am getting is  500 Internal Server Error.

 

JSON that i'm trying to send

{
"body": "test body",
"group_id": "12107481088",
"message_type": "praise",
"title": "title",
"praise": {
"comment": "test comment",
"icon": "thumbsup",
"praised_user_ids": [1548606417,120248147968]
},
"skip_body_notifications" : "true"
}

 

Headers

Authorization: Bearer #Token;
Content-Type: application/json

 

Can anybody help me out to solve this issue ?

 

clipboard_image_1.png