Not able to create lead form with background image via API

28 views
Skip to first unread message

chandra Shekhar

unread,
Dec 14, 2023, 2:30:23 AM12/14/23
to Google Ads API and AdWords API Forum
Hi team,

I am using API to create lead form with background_image_asset, but it's giving below error:-

{
"success": false,
"full_message": "errors {\n error_code {\n media_upload_error: DIMENSIONS_NOT_ALLOWED\n }\n message: \"The dimensions of the image are not allowed.\"\n location {\n field_path_elements {\n field_name: \"operations\"\n index: 0\n }\n field_path_elements {\n field_name: \"create\"\n }\n field_path_elements {\n field_name: \"lead_form_asset\"\n }\n field_path_elements {\n field_name: \"background_image_asset\"\n }\n }\n}\nrequest_id: \"DQcRvKpfrY7_rZknwnUXmg\"\n",
"message": "The dimensions of the image are not allowed.",
"RESULT": "FAIL",
"ERROR": "The dimensions of the image are not allowed."
} Here are the more details:- CustomerID: 1416728966, RequestID: DQcRvKpfrY7_rZknwnUXmg Headers: {developer-token=REDACTED, login-customer-id=6150134023, x-goog-api-client=gl-java/1.8.0_341 gccl/23.0.0 gapic/23.0.0 gax/2.22.0 grpc/1.52.1 pb/3.21.12}
Body: customer_id: "1416728966"
operations {
  create {
    lead_form_asset {
      fields {
        input_type: PHONE_NUMBER
      }
      fields {
        input_type: JOB_TITLE
      }
      business_name: "Buz name 333"
      headline: "edar postman 14/12 //1"
      description: "Description 222"
      privacy_policy_url: "https://google.com/privacy"
      post_submit_headline: "post headline 222"
      post_submit_description: "post desc 222"
      call_to_action_type: CONTACT_US
      call_to_action_description: "CTA desc 4444"
      post_submit_call_to_action_type: SHOP_NOW
      background_image_asset: "customers/1416728966/assets/116948949932"
      custom_question_fields {
        custom_question_text: "B\341\272\241n th\303\255ch \304\221\341\272\241i l\303\275 n\303\240o?"
      }
      custom_question_fields {
        custom_question_text: "Which vehicle make are you interested in?"
        single_choice_answers {
          answers: "444"
          answers: "555"
          answers: "666"
        }
      }
    }
    final_urls: "https://google.com/444"
  }
}


Response
--------
Headers: Metadata(content-type=application/grpc,request-id=DQcRvKpfrY7_rZknwnUXmg,date=Thu, 14 Dec 2023 07:12:18 GMT,alt-svc=h3=":443"; ma=2592000,h3-29=":443"; ma=2592000)
Body: null
Failure message: errors {
  error_code {
    media_upload_error: DIMENSIONS_NOT_ALLOWED
  }
  message: "The dimensions of the image are not allowed."
  location {
    field_path_elements {
      field_name: "operations"
      index: 0
    }
    field_path_elements {
      field_name: "create"
    }
    field_path_elements {
      field_name: "lead_form_asset"
    }
    field_path_elements {
      field_name: "background_image_asset"
    }
  }
}
request_id: "DQcRvKpfrY7_rZknwnUXmg" Even though used image is well with the given conditions, still I am getting dimension error.(Asset resource name of the background image. The minimum size is 600x314 and the aspect ratio must be 1.91:1 (+-1%).) Let me if I am missing something. Thanks.

Google Ads API Forum Advisor

unread,
Dec 14, 2023, 4:47:45 AM12/14/23
to chandra...@knorex.com, adwor...@googlegroups.com
Hi,

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

I see that you have already raised this concern on another thread with the subject 'Not able to create lead form with background image via API', and we have already responded there for this issue. To avoid multiple threads on the same issue, please take a look at that thread and continue the discussion on the same for further updates on the issue.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02r1kvB:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages