Method: accounts.userLinks.batchCreate

Creates information about multiple users' links to an account or property.

This method is transactional. If any UserLink cannot be created, none of the UserLinks will be created.

HTTP request

POST https://analyticsadmin.googleapis.com/v1alpha/{parent=accounts/*}/userLinks:batchCreate

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The account or property that all user links in the request are for. This field is required. The parent field in the CreateUserLinkRequest messages must either be empty or match this field. Example format: accounts/1234

Request body

The request body contains data with the following structure:

JSON representation
{
  "notifyNewUsers": boolean,
  "requests": [
    {
      object (CreateUserLinkRequest)
    }
  ]
}
Fields
notifyNewUsers

boolean

Optional. If set, then email the new users notifying them that they've been granted permissions to the resource. Regardless of whether this is set or not, notifyNewUser field inside each individual request is ignored.

requests[]

object (CreateUserLinkRequest)

Required. The requests specifying the user links to create. A maximum of 1000 user links can be created in a batch.

Response body

If successful, the response body contains an instance of BatchCreateUserLinksResponse.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.manage.users

CreateUserLinkRequest

Request message for userLinks.create RPC.

Users can have multiple email addresses associated with their Google account, and one of these email addresses is the "primary" email address. Any of the email addresses associated with a Google account may be used for a new UserLink, but the returned UserLink will always contain the "primary" email address. As a result, the input and output email address for this request may differ.

JSON representation
{
  "parent": string,
  "notifyNewUser": boolean,
  "userLink": {
    object (UserLink)
  }
}
Fields
parent

string

Required. Example format: accounts/1234

notifyNewUser

boolean

Optional. If set, then email the new user notifying them that they've been granted permissions to the resource.