SuperAPI AI Directory

linkfox-temu-ads-global

Marketing & growth

View repository

Updated 10-16 09:58

About this skill

Temu Global — E-commerce Advertising (Ads)

This skill (linkfox-temu-ads-global) covers Partner Platform for Global Ads / E-commerce Advertising(ad campaigns, delivery, reports, etc.;menu_code and each sub_menu_code are subject to the Partner backend, see partner-global-catalog.md)。

Integrated 7 Partner Ads(temu.searchrec.ad.*) interfaces, see the list at partner-global-catalog.md。

Gateway (built into this skill):

Capability Method Path
Advertising OpenAPI (global_ads_*、temu_global_proxy) POST https://tool-gateway.linkfox.com/temu/proxy
Signed file download POST https://tool-gateway.linkfox.com/temu/fileDownload

Related skills

Scenario skill
Advertising Ads(this skill) linkfox-temu-ads-global
Product list/details/edit/inventory/listing and delisting linkfox-temu-manage-product-global
Promotions/marketing campaigns linkfox-temu-promotion-global
Product publishing linkfox-temu-add-product-us
Price/supply price, pricing sheet linkfox-temu-price-global
Order list/details linkfox-temu-order-global
Returns and refunds linkfox-temu-returns-refunds-global
Gateway and Temu token This skill scripts/

How to call

  • API endpoint:POST /temu/proxy(different operations are distinguished by the request body; for complete parameters/responses/error codes see references/api.md)
  • Python script:python scripts/<脚本名>.py '<JSON 参数>' [--inline](for available scripts see the script list above)
  • Cost constraint: This tool consumes compute; on failure/empty results, do not automatically switch keywords, paginate, or repeatedly probe; if you need to continue searching, first explain to the user that additional consumption will be incurred.

Output strategy (default script behavior):

  • Alwayswrite the complete response to <cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-temu-ads-global-<timestamp>.json(<cwd> is the working directory when the script is executed, which in Claude Code is the current project directory;<session> is taken from the environment variable SESSION_ID, automatically aggregated according to the user's task;writing to /tmp is prohibited, if the current directory is not writable, report an error)
  • Response body ≤ 8 KB: after writing to disk, print the complete JSON to stdout
  • Response body > 8 KB: after writing to disk, stdout outputs only a summary (top-level fields, common counts such as total/costToken, length of the largest list field + first 3 samples)
  • Add --inline to force full printing to stdout (also written to disk)

Data reading suggestions: first look at the summary to judge whether it is sufficient; when specific fields are needed, prefer jqorConvertFrom-Json to extract on demand from the saved json file, avoiding bringing the entire JSON into context.

Resolve authentication and compute issues

When the following abnormal situations occur, use references/onboarding.md to guide resolution:

Abnormal situations

  • API Key not configured: the environment variable is not configured LINKFOX_AGENT_API_KEY, and LINKFOXAGENT_API_KEY。
  • Response 401 or 402 status code
  • Response indicates insufficient compute or balance: the message contains "insufficient compute balance/insufficient billing/insufficient balance/quota exceeded/insufficient balance/package expired/recharge required/please recharge", or content with similar meaning.

Default parameters

Field Default Description
site global Partner Global
managementType semi-managed Semi-managed (refer to the Partner documentation for the specific API)
tokenPurpose product-inventory Seller Assistant default (if a Partner Ads API requires a different tokenPurpose, refer to that API's documentation)

Authentication

  1. LinkFox:LINKFOXAGENT_API_KEY → Header Authorization + Token
  2. Temu:accessToken or storeKey(storeKey , it is recommended to include tokenPurpose=product-inventory)

Scripts

Script Description
temu_global_proxy.py Any type
temu_global_file_download.py Signed download
global_ads_searchrec_ad_roas_pred.py temu.searchrec.ad.roas.pred
global_ads_searchrec_ad_reports_mall_query.py temu.searchrec.ad.reports.mall.query
global_ads_searchrec_ad_create.py temu.searchrec.ad.create
global_ads_searchrec_ad_detail_query.py temu.searchrec.ad.detail.query
global_ads_searchrec_ad_log_query.py temu.searchrec.ad.log.query
global_ads_searchrec_ad_goods_create_query.py temu.searchrec.ad.goods.create.query
global_ads_searchrec_ad_modify.py temu.searchrec.ad.modify

Integrating a new API (convention)

For each Partner document you provide (type + sub_menu_code + URL + Request/Response parameter table), we will:

  1. Add references/apis/<type-slug>.md(full input/output hierarchy)
  2. Add scripts/global_ads_<slug>.py(call _global_ads_script.run_cli)
  3. Update partner-global-catalog.md、apis/README.md and this table

Example (generic proxy)

export LINKFOXAGENT_API_KEY="<key>"

python scripts/temu_global_proxy.py '{
  "accessToken": "TOKEN",
  "tokenPurpose": "product-inventory",
  "type": "<TEMU_API_TYPE>",
  "params": {
    "request": {}
  }
}'

Feedback: skillName:linkfox-temu-ads-global

Gateway and authorization scripts

Script Description
check_linkfox_token.py Verify LinkFox user Token
temu_token_guide.py Temu accessToken backend authorization steps
save_temu_access_token.py Save accessToken locally
list_temu_access_tokens.py List saved tokens
get_temu_access_token.py Read saved token
temu_proxy.py Generic gateway forwarding (multi-site)
temu_file_download.py Signed file download (multi-site)

Authorization notes:references/access-token.md

Compute power consumption rules

No compute power is consumed.