Jamil
Jamil

Reputation: 858

Yammer API - Can we get list of groups from yammer API for a current user?

I want to get list of groups that user has joined using yammer API. I have not seen any support in REST API. Is there any way to get list of groups for a current user?

Upvotes: 2

Views: 7906

Answers (3)

Mahesh
Mahesh

Reputation: 731

you can use bellow code. if you want all the groups of your network then remove "?mine=1" from url.

yam.platform.request({
                // yam.request({
                url: "groups.json?mine=1",
                method: "GET",
                data: {},
                success: function (group) {
                    myGroups = group;
                    getCurrentGroups();

                },

                error: function (group) {
                    console.error("There was an error with the request.");
                }
            });

Upvotes: 0

Brian Lyttle
Brian Lyttle

Reputation: 14579

This is the documented call to get the groups for the current user: https://www.yammer.com/api/v1/users/current.json?include_group_memberships=true.

Upvotes: 5

Jamil
Jamil

Reputation: 858

We can get list of groups using following REST API:

https://www.yammer.com/api/v1/groups.json?mine=1

Upvotes: 7

Related Questions