You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

咨询Yammer API获取全公司群组消息的正确请求格式及示例

Fixing Yammer API Request for All Company Group Messages

I’ve run into this exact issue before—using 0 as the group ID for the All Company group doesn’t work because Yammer doesn’t actually use 0 as a valid ID for that group. Here’s how to correctly pull those messages:

Option 1: Use the Actual All Company Group ID

First, you need to retrieve the real group ID for your network’s All Company group:

  • Send a GET request to:
    https://www.yammer.com/api/v1/groups.json?network_id=Default
    
  • In the JSON response, look for the group with the name All Company (or your network’s localized equivalent, like "全公司" for Chinese). Grab the id value from that entry—it’ll be a positive integer, similar to the 118******* ID you used for your other group.

Once you have that ID, construct your request just like you did for the specific group:

https://www.yammer.com/api/v1/messages/in_group/{ALL_COMPANY_GROUP_ID}.json?network_id=Default&newer_than=408119030538240

Replace {ALL_COMPANY_GROUP_ID} with the actual ID you pulled from the groups endpoint. This will return the same structured JSON response you get from your working group request.

Option 2: Use the Company Feed Endpoint (No Group ID Needed)

If you don’t want to fetch the group ID first, Yammer has a dedicated parameter to pull the company-wide feed directly:

  • Send a GET request to:
    https://www.yammer.com/api/v1/messages.json?feed_type=company&network_id=Default&newer_than=408119030538240
    

The feed_type=company parameter tells the API to return all messages visible across your entire network, which is exactly what the All Company group includes.

Why 0 Doesn’t Work

Yammer assigns unique positive integer IDs to all groups, including the All Company group. 0 isn’t a valid group ID in their system, so the API doesn’t recognize that request and throws an error instead of returning the expected messages.

内容的提问来源于stack exchange,提问作者Dmitri Vorobev

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 08:27:36