GenerateShareablePreviews

Returns the requested Shareable Preview.

HTTP request

POST https://googleads.googleapis.com/v24/customers/{customerId}:generateShareablePreviews

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
customerId

string

Required. The customer creating the shareable previews request.

Request body

The request body contains data with the following structure:

JSON representation
{
  "operation": {
    object (GenerateShareablePreviewsOperation)
  }
}
Fields
operation

object (GenerateShareablePreviewsOperation)

The operation to generate shareable previews.

Response body

Response message for ShareablePreviewService.GenerateShareablePreviews.

If successful, the response body contains data with the following structure:

JSON representation
{
  "result": {
    object (GenerateShareablePreviewsResult)
  }
}
Fields
result

object (GenerateShareablePreviewsResult)

The result of the generate shareable previews action.

GenerateShareablePreviewsOperation

Operation to generate shareable previews.

JSON representation
{
  "shareablePreviews": [
    {
      object (ShareablePreview)
    }
  ]
}
Fields
shareablePreviews[]

object (ShareablePreview)

Required. The list of shareable previews to generate.

ShareablePreview

A shareable preview with its identifier.

JSON representation
{
  "previewType": enum (PreviewType),

  // Union field identifier can be only one of the following:
  "adGroupAd": string,
  "assetGroup": string
  // End of list of possible types for union field identifier.
}
Fields
identifier. The identifier of the shareable preview. identifier can be only one of the following:
adGroupAd

string

Ad group ad of the shareable preview. Only supported for preview type YOUTUBE_LIVE_PREVIEW. Format: customers/{customerId}/adGroupAds/{adGroupId}~{ad_id}

assetGroup

string

Asset group of the shareable preview. Format: customers/{customerId}/assetGroups/{assetGroupId}

previewType

enum (PreviewType)

Required. The type of preview to generate.

PreviewType

Enum describing the preview type. Next Id: 4

Enums
UI_PREVIEW Request a URL to a preview in the Google Ads UI. The generated URLs are shareable.
UNKNOWN Used for return value only. Represents value unknown in this version.
UNSPECIFIED Not specified.
YOUTUBE_LIVE_PREVIEW Request a URL to a preview of the ad in YouTube. The generated URLs are shareable.

GenerateShareablePreviewsResult

Result of the customers.generateShareablePreviews action.

JSON representation
{
  "previews": [
    {
      object (ShareablePreviewResult)
    }
  ]
}
Fields
previews[]

object (ShareablePreviewResult)

List of previews.

ShareablePreviewResult

Message to hold a shareable preview result.

JSON representation
{
  "expirationDateTime": string,

  // Union field result can be only one of the following:
  "uiPreviewResult": {
    object (UiPreviewResult)
  },
  "youtubeLivePreviewResult": {
    object (YouTubeLivePreviewResult)
  }
  // End of list of possible types for union field result.

  // Union field identifier can be only one of the following:
  "adGroupAd": string,
  "assetGroup": string
  // End of list of possible types for union field identifier.
}
Fields
expirationDateTime

string

Expiration date time using the ISO-8601 format.

identifier. The identifier of the shareable preview. identifier can be only one of the following:
adGroupAd

string

Ad group ad of the shareable preview. Format: customers/{customerId}/adGroupAds/{adGroupId}~{ad_id}

assetGroup

string

Asset group of the shareable preview. Format: customers/{customerId}/assetGroups/{assetGroupId}

result. The result of the shareable preview. result can be only one of the following:
uiPreviewResult

object (UiPreviewResult)

The result of a UI preview. Only populated for preview type UI_PREVIEW.

youtubeLivePreviewResult

object (YouTubeLivePreviewResult)

The result of a YouTube live preview. Only populated for preview type YOUTUBE_LIVE_PREVIEW.

UiPreviewResult

Message to hold a UI preview result.

JSON representation
{
  "shareablePreviewUrl": string
}
Fields
shareablePreviewUrl

string

The shareable preview URL.

YouTubeLivePreviewResult

Message to hold a YouTube live preview result.

JSON representation
{
  "youtubePreviewUrl": string,
  "youtubeTvPreviewUrl": string
}
Fields
youtubePreviewUrl

string

The shareable preview URL for YouTube videos.

youtubeTvPreviewUrl

string

The shareable preview URL for YouTube TV.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/adwords

For more information, see the OAuth 2.0 Overview.