Hello Ahmed,
You will be able to create the Responsive display ads using the AdGroupAdService and the MutateAdGroupAdsRequest. The parameters that can be set for a responsive display ad are listed here.You may refer to the AddExpandedTextAds.java code sample as a reference (code samples in other languages can be found here). Also, it looks like you are incorrectly specifying the headline text value. Could you please verify this on your end referring to the below code snippet and let me know if this helps? If the issue persists, could you please share the complete request and response logs along with the client customer id for further investigation?
ad_group_ad.ad.responsive_display_ad.headlines.text.value = "headline1 text"
ad_group_ad.ad.responsive_display_ad.headlines.pinned_field = client.get_type('ServedAssetFieldTypeEnum',version='v2').HEADLINE_1
P.S. Please use Reply privately to author option while sharing the details.
Regards,
Nikisha Patel, Google Ads API Team