You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
meta_ads_ad_sets_create and meta_ads_ad_sets_update take destination_type, and meta_ads_ad_sets_get / meta_ads_ad_sets_list return it. It is the Marketing API ad set field for where the ads send people (WEBSITE, APP, MESSENGER, WHATSAPP, INSTAGRAM_DIRECT, PHONE_CALL, ON_AD, ...), passed through as a string because Meta's value list changes between API versions; Meta rejects values that do not fit the campaign objective. An ad set created without it is stored as UNDEFINED, and only an ON_AD ad set can carry an Instant Form ad: create the ad set with destination_typeON_AD, optimization_goalLEAD_GENERATION or QUALITY_LEAD and promoted_object{"page_id": "<page id>"} under an OUTCOME_LEADS campaign, or change an existing one with meta_ads_ad_sets_update. The Meta Ads skill's Instant Form workflow now does this.
meta_ads_ad_sets_create takes start_time / end_time, and meta_ads_ad_sets_update takes start_time. Both accept an ISO 8601 datetime string or a UTC UNIX timestamp and are checked before any request; on create, end_time keeps the 0 = "no end date" value it has on update, while start_time refuses 0. An ad set created without start_time starts at creation time, and Meta only moves a start that is still in the future (it refuses the change once the start has passed, also for a paused ad set), so a later start is set at creation.
Fixed
A Meta Ads request the platform rejects as invalid is no longer reported as a credential failure. The Marketing API puts the error type OAuthException on validation and rate-limit errors as well as on token errors, and any response of that type was returned as {"status": "auth_error", "auth_cause": "token_invalid"}, which tells the operator to authorize again and makes a report treat the platform as unreadable. A response now counts as a credential failure when it is HTTP 401, carries error code 102 or 190, carries a permission code (10, 200–299) with that type, or has that type and no code. Everything else, including error code 100 for an invalid parameter, is returned as an API error with the platform's own message.
meta_ads_creatives_create_lead attaches the Instant Form on image creatives. For an image creative the form id was sent directly on object_story_spec.link_data, which is not a field the Marketing API documents there. It is now sent under link_data.call_to_action.value.lead_gen_form_id, where the Marketing API takes it; video creatives already sent it there. The tool's arguments and return shape are unchanged.