On the official documentation it seems easy for a user to request membership of a group, private or public.
https://developer.yammer.com/v1.0/docs/group_membershipsjsongroup_idid
However what about responding to these invites? I am trying to automate the process of a user choosing to join a group and then the admin allowing this.
Another approach that would work is being able to just add that user to the group using the API and service account/verified admin. Both of which I don't know how to do and cannot find anything on here or their documentation. Any help would be great.
Post to - https://www.yammer.com/api/v1/group_memberships.json?group_id={0}&user_id={1}&approve=1
Group id is the Yammer group id User id is the user id who is planned to be approved.
Post request should have Authorization - Bearer
Headers.Add("Authorization", string.Concat("Bearer ", token));
Token is the oAuth token generated from developer.yammer.com - Test token section in step 8 of verified admin user. Verified admin should be group admin as well.
I do have end to end solution with explanation in this blog - http://aravind-microsofttech.blogspot.sg/2015/10/add-user-to-yammer-group-and-approve.html
Please share your comment so that I can improve the solution and others can get benefited from it.