set_tiktok_post_ad_authorization
Turn Spark-Ads authorization on or off for the brand’s own post destructive
Description
Turn TikTok's 'Ad authorization' setting ON or OFF for a post the authorized account owns — THIS IS WHERE A SPARK ADS AUTHORIZATION CODE COMES FROM. For somebody ELSE's post the code still comes from that creator, copied out of the TikTok app. Turning it on mints the code, which you then hand to authorize_tiktok_ads_spark_post so an ad account may promote the post. IT IS CONFIRM-GATED ON THE WAY ON, and not because it spends: TikTok changes the post's privacy to 'Available for Ads', sends it to their ad review team, says the post 'may also appear as an ad on third party platforms', and treats the call as accepting their Advertising Content Terms on the owner's behalf. Turning it OFF needs no confirm — but TikTok REFUSES to turn it off while an active Spark Ad is using the post, so pause those campaigns first. authorizationDays must be one of 7, 30, 60, 180, 365. THE ANSWER IS THE READ-BACK: the reply carries the post's real authorization status and its code, because TikTok's own response body is empty. NEEDS THE TIKTOK ACCOUNT AUTHORIZATION (see tiktok_account_status).
Parameters
| Parameter | Type | Description |
|---|---|---|
itemIdrequired | string | the TikTok post id |
enabledrequired | boolean | true turns Ad authorization ON (and mints the Spark Ads code); false turns it off |
authorizationDays | number | 7 | 30 | 60 | 180 | 365 — TikTok publishes exactly those five; default 30 |
confirm | boolean | REQUIRED true when enabling — it makes the post publicly promotable and accepts TikTok’s advertising terms on the owner’s behalf |
Example call
Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and POST https://app.hermoso.ai/v1/tools/set_tiktok_post_ad_authorization.
MCP (tools/call)
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"set_tiktok_post_ad_authorization","arguments":{"itemId":"<string>","enabled":"<boolean>"}}}
CLI
hermoso call set_tiktok_post_ad_authorization --json '{"itemId":"<string>","enabled":"<boolean>"}'
Credits
Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See Credits & costs.
Related tools
authorize_tiktok_ads_spark_postApply a TikTok Spark Ads authorization codetiktok_account_statusCheck the TikTok account authorizationupload_tiktok_comment_imageUpload an image for a TikTok commentget_tiktok_post_ad_authorizationRead a post’s Spark-Ads authorization statussearch_tiktok_locationsFind a TikTok location tagextend_tiktok_post_ad_authorizationExtend a post’s Spark-Ads authorizationmoderate_tiktok_commentLike, hide, pin or delete a TikTok commentdelete_tiktok_post_ad_authorizationDelete a post’s Spark-Ads authorization codereply_to_tiktok_commentReply to a comment on the brand’s TikTok postcomment_on_tiktok_videoPost a new comment on the brand’s own TikTok post