PerformanceMax Asset Group Ad preview

90 views
Skip to first unread message

Ramanajee

unread,
Dec 12, 2024, 3:07:39 PM12/12/24
to Google Ads API and AdWords API Forum
Hi,
can I get any working example for  ShareablePreviewService? 


Google Ads API Forum Advisor

unread,
Dec 12, 2024, 8:58:40 PM12/12/24
to ramana...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

I understand that you are looking for a specific example for the ShareablePreviewService for reviewing the performance max asset group ads using the Google Ads API. Kindly note that officially there is no specific example in the Google Ads API documentation for using this service. Kindly note that after creating asset groups and linking assets to them, you can generate a shareable preview to showcase how the ads created from each asset group will appear. You need to pass the asset group IDs to ShareablePreviewService.GenerateShareablePreviews, you can obtain URLs for the ad previews, along with their expiration timestamps, which can be shared with your users. You can use this method for making an API call using the Google Ads API. However, I have created from my end and provided you the sample request and response logs for your reference.
Request Body:
==============

POST https://googleads.googleapis.com/v18/customers/{customer ID}:generateShareablePreviews?key=[YOUR_API_KEY] HTTP/1.1

developer-token: **********************
Authorization: Bearer [YOUR_ACCESS_TOKEN]
Accept: application/json
Content-Type: application/json

{
  "shareablePreviews": [
    {
      "assetGroupIdentifier": {
        "assetGroupId": {assetGroupID}
      }
    }
  ]
}
Response:
==========

HTTP/1.1 200 
content-encoding: gzip
content-length: 362
content-type: application/json; charset=UTF-8
date: Fri, 13 Dec 2024 01:29:01 GMT
server: ESF
vary: Origin, X-Origin, Referer

{
  "responses": [
    {
      "shareablePreviewResult": {
        "shareablePreviewUrl": "{URL}",
        "expirationDateTime": "2024-12-27 06:59:01.098"
      },
      "assetGroupIdentifier": {
        "assetGroupId": "{asset group ID}"
      }
    }
  ]
}
I hope this helps.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vGont:ref" (ADR-00278623)

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5


 


Ramanajee

unread,
Dec 12, 2024, 10:41:39 PM12/12/24
to Google Ads API and AdWords API Forum
Hi,
Thanks for the detailed explanation,
I tried the same in code but I am getting the below error message

[ "[ASSET_GROUP_DOES_NOT_EXIST_UNDER_THIS_CUSTOMER]" ]
I am using Google Ads Test Account

 Customer ID:  164-882-7291
Asset Group Id:  6538300920

Please let me know If I'm missing anything

Please find my code snippet below
PMAX-AdPreview-Code.PNG

Google Ads API Forum Advisor

unread,
Dec 13, 2024, 3:19:09 AM12/13/24
to ramana...@gmail.com, adwor...@googlegroups.com
Hi,

I can confirm that the asset group ID 6538300920 exists under the customer ID 164-882-7291. To assist you further regarding the 'ASSET_GROUP_DOES_NOT_EXIST_UNDER_THIS_CUSTOMER' error, please provide us with the complete API logs (request and response logs with request-id and request header) generated at your end while making the request.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java.NetPHPPythonRuby or Perl to enable logging at your end.

You can send the details via Reply privately to the author option, or direct private reply to this email.
Reply all
Reply to author
Forward
0 new messages