question

kozoo-4207 avatar image
0 Votes"
kozoo-4207 asked RaytheonXie-MSFT answered

Unable to post message via Yammer API in group belongs to External Network

Hi,
We have two networks in our Yammer:

Home network - used internally in our company

External network - to post some information for our partners.

197976-image.png

We set up some automation using Yammer API to post messages from the scripts. It works fine but only for our Home Network.
When trying to post a message in a group that belongs to an external network I'm getting (403) Forbidden response.


When call https://www.yammer.com/api/v1/networks/current.json I got information about both networks,

The same situation in case of call /oauth/tokens.json resource -> I get a response containing details about both networks.

How looks my request:

headers:

     Authorization = Bearer [JWT token]

     'Content-Type' = 'multipart/form-data'

     'Accept-Encoding' = 'giz,deflate,br'

     'yammer-capbilities' = 'external-messaging,external-groups'

body:

     body = 'text of yammer post'

     group_id = 'number of a group in Yammer'

     is_rich_text = 'true'

     message_type = 'normal'

     title = 'title of yammer post'


This works perfectly when I'm posting in the primary home network.
I googled a whole internet but found nothing. Please help.


partner-center-api
image.png (8.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RaytheonXie-MSFT avatar image
0 Votes"
RaytheonXie-MSFT answered

Hi @kozoo-4207 ,
Since the issue is about Yammer. Microsoft has a dedicated forum to discuss about Yammer. You can get some more professional advice in the following forum.
https://techcommunity.microsoft.com/t5/yammer/ct-p/Yammer


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.