使用PHP Google Directory API将大量用户添加到Google群组

I need to add a large number of users to a Google Group using the PHP toolkit for the Google Directory API.

I am using: Members->insert

This works fine to add a user one at a time, but it is slow when you have to add a large number of users.

Is it possible to pass in an array to simply insert a bulk set of users at once?

The documentation that you linked to has a best practices for sending batch requests.

You should start there. If you have a specific issue with that, post a question with a Minimal, Complete, and Verifiable example.


Reminder about the batch link above:

This document is specifically about making a batch request by sending an HTTP request. If, instead, you're using a Google client library to make a batch request, see the client library's documentation.