The Google+ Domains API allows your app to remove people who are in the Google Apps domain of the user from the user's circles. The API limits operations to only users within your Google apps domain.
To remove a user from a circle, your app must request the following scopes:
- Grants the app permission to use the special value
meto represent the authenticated user. Does not apply to apps that use domain-wide delegation of authority.
- Required - Grants permission for the app to create circles, delete circles, add people and pages to the user's circles, and remove people and pages from the user's circles. The Google+ Domains API only permits adding and removing people in the same Google Apps domain as the user.
The following example demonstrates how to remove people from a circle within your Google Apps domain.
// This sample assumes a client object `plusDomains` has been created, // and that you know the ID of the user you wish to remove, as well as // the ID of the circle to remove them from. // To learn more about creating a client, see the OAuth 2.0 example: // https://developers.google.com/+/domains/authentication/ import java.util.List; import com.google.api.services.plusDomains.PlusDomains.Circles.RemovePeople; String circleId = "a1234b"; String userId = "1234"; List<String> userIdsToRemove = new ArrayList<String>(); userIdsToRemove.add(userId); RemovePeople removePeople = plusDomains.circles().removePeople(circleId); removePeople.setUserId(userIdsToRemove); removePeople.execute();
# This sample assumes a client object `service` has been created, and # that you know the ID of the user you wish to remove, as well as the ID # of the circle to remove them from. # To learn more about creating a client, see the OAuth 2.0 example: # https://developers.google.com/+/domains/authentication/ user_id = '1234' circle_id = 'a1234b' remove_service = service.circles().removePeople(circleId=circle_id, userId=user_id) result = remove_service.execute()
REST API method.