{"record":{"id":"c6408e7b55f51f91","repo":"gitroomhq/postiz-app","slug":"tiktok-refused-to-publish-your-post","errorCode":null,"errorMessage":"TikTok refused to publish your post","messagePattern":"TikTok refused to publish your post","errorType":"exception","errorClass":"BadBody","httpStatus":null,"severity":"error","filePath":"libraries/nestjs-libraries/src/integrations/social/tiktok.business.provider.ts","lineNumber":781,"sourceCode":"            id: response.id,\n            releaseURL: check.releaseURL,\n            postId: String(check.postId),\n            status: 'success',\n          },\n        ];\n      }\n\n      // Cap below the 10-minute activity timeout of the old workflows using\n      // this method: failing here (non-retryable) is safe, timing the activity\n      // out is not - a retried activity would publish the post again.\n      if (Date.now() - started > 8 * 60 * 1000) {\n        break;\n      }\n\n      await timer(20000);\n    }\n\n    throw new BadBody(\n      'tiktok-business-error-upload',\n      JSON.stringify({}),\n      Buffer.from(JSON.stringify({})),\n      'TikTok refused to publish your post'\n    );\n  }\n\n  // The trending list has no text search parameter - genre / country / date\n  // range are the only filters - so the UI filters the returned list locally.\n  @Tool({\n    description:\n      'Load commercial music library tracks that can be attached to a post via the \"music\" setting',\n    dataSchema: [\n      {\n        key: 'genre',\n        type: 'string',\n        description:\n          'Genre to filter the tracks by (for example POP, ROCK, ELECTRONIC), leave empty for all genres',","sourceCodeStart":763,"sourceCodeEnd":799,"githubUrl":"https://github.com/gitroomhq/postiz-app/blob/0f1647f7491a217d43eb5ae7a480484bdf0aff3e/libraries/nestjs-libraries/src/integrations/social/tiktok.business.provider.ts#L763-L799","documentation":"The synchronous post() wrapper polls postPending status every 20s; if the loop breaks out without reaching a terminal success state it throws 'TikTok refused to publish your post'. This is a polling-exhaustion failure on top of a pending direct post.","triggerScenarios":"The status poll exits its loop (attempt cap or condition break) while the direct post is still pending or stuck, without an explicit FAILED status being observed.","commonSituations":"TikTok processing stalls, transient status endpoint errors shortening the loop, or slow moderation queues exceeding the poll budget.","solutions":["Query the direct-post status endpoint manually with the share_id to see the real state","Retry the post if the status truly never completed","Reduce media size to speed TikTok processing"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await provider.post(...); } catch (e) { if (/refused to publish/.test(e.message)) { const st = await queryDirectPostStatus(shareId); if (st !== 'PUBLISHED') scheduleRetry(post); } throw e; }","preventionTips":["Always confirm the direct-post status via share_id before retrying","Compress media to reduce processing time","Add alerting on polling-exhaustion failures"],"tags":["tiktok","polling","publish","timeout"],"backgroundTag":"remote-processing-timeout","analyzedSha":"0f1647f7491a217d43eb5ae7a480484bdf0aff3e","analyzedAt":"2026-08-27T12:09:55.020Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}