The Yammer REST API is well documented here. On the other hand, you might miss some documentation regarding some endpoints on that page. For example, there is no notion about how to interact with Yammer Groups. Fortunately, with a little bit of network tracing and by following the naming convention of the other endpoints, you might be able to identify how to interact with groups quite easily. This post summarizes how to access the groups endpoint.

You can generate the baerer token (access token) as described in this post.

Always consider the REST API and Rate Limits when accessing a Yammer network.

Retrieve the groups in a network

The snippet presented in this section is retrieving the list of groups in a network. You can then use this list and perform other operations.

Retrieve a group by ID

The next snippet shows how to retrieve a single group by id instead of accessing it through the whole network.

Create a new group

The snippet presented below shows how to create a group by name. You can also specify additional paramters such as the privacy or group type.

Delete a group by ID

The snippet below shows how to delete a group by ID.

You need to be the administrator of that group or a verified admin that is member of that specific group. A verified admin can add him/herself by using the *group_memberships.json* endpoint. You will receive a 403 forbidden error message if you do not consider this.

comments powered by Disqus