linkstringwajib
WeChat Official Account article short link or intermediate link to convert.
https://api.sandbase.ai/v1/api/wechat-mp/convert-article-linkExpands a WeChat Official Account article link to its resolved long-form destination. Use it to normalize a short or intermediate link before article lookup or collection.
Output Anda akan muncul di sini
Lengkapi input, lalu klik Run.
This API takes a WeChat Official Account article link and returns two normalized URLs for the same article. It needs one input, link, which can be a short link or an intermediate link.
long_url values.mp.weixin.qq.com/s/... link for sharing or display.curl -X POST "https://api.sandbase.ai/v1/api/wechat-mp/convert-article-link" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"link": "http://mp.weixin.qq.com/s?__biz=MjM5NzI3NDg4MA==&mid=2659064933&idx=1&sn=c536f78d7358bc2dfe90cde700e21d55&chksm=bc881cb3f28a27f35e0711803b28d8110305cfc1b8beb651674e1aa7870ddf963c658f4dc19a&scene=7#rd"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
link | string | Yes | WeChat Official Account article short link or intermediate link to convert. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"long_url": "https://mp.weixin.qq.com/s?__biz=MjM5NzI3NDg4MA==&mid=2659064933&idx=1&sn=c536f7…",
"short_url": "https://mp.weixin.qq.com/s/THnBSh_vaxhLeYa2lp3d1g"
}
| Field | Meaning |
|---|---|
long_url | The article link in long form. It carries the __biz, mid, idx and sn query parameters that identify the account and the article. |
short_url | The short form of the article link, in the format https://mp.weixin.qq.com/s/<code>. |
link field. The example input is an intermediate link that includes extra parameters such as chksm and scene.long_url drops the chksm and scene parameters from the input link and keeps __biz, mid, idx and sn.$0.014286 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Mulai membangun
Endpoint API platform dengan autentikasi dan pelacakan penggunaan terpadu.
curl -X POST "https://api.sandbase.ai/v1/api/wechat-mp/convert-article-link" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"link": "http://mp.weixin.qq.com/s?__biz=MjM5NzI3NDg4MA==&mid=2659064933&idx=1&sn=c536f78d7358bc2dfe90cde700e21d55&chksm=bc881cb3f28a27f35e0711803b28d8110305cfc1b8beb651674e1aa7870ddf963c658f4dc19a&scene=7#rd"
}'Atur SandBase API key Anda di environment server Anda. Permintaan menggunakan autentikasi Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Simpan key Anda di server. Jangan tampilkan di kode browser.
linkstringwajibWeChat Official Account article short link or intermediate link to convert.
Contoh respons yang disimpan untuk API ini; tidak ada permintaan langsung yang dibuat saat melihatnya.
Belum ada respons tersimpan yang dipublikasikan. Jalankan API di Playground untuk melihat responsnya.
Jelajahi lebih lanjut
| API | Harga | Respons |
|---|---|---|
WeChat MP | $0.014286 per panggilan | JSON |
WeChat MP | $0.142857 per panggilan | JSON |
WeChat MP | $0.042857 per panggilan | JSON |
WeChat MP | $0.028571 per panggilan | JSON |
WeChat MP | $0.021429 per panggilan | JSON |
WeChat MP | $0.021429 per panggilan | JSON |
Pertanyaan
Kirim permintaan POST ke https://api.sandbase.ai/v1/api/wechat-mp/convert-article-link dengan kunci API SandBase Anda di header Authorization (Bearer) dan parameter sebagai body JSON. Anda juga dapat mencobanya di Playground di halaman ini tanpa menulis kode.
$0.014286 per panggilan, ditagihkan dari saldo SandBase Anda. Anda hanya dikenai biaya untuk panggilan yang Anda lakukan; tidak ada langganan.
Wajib: link (string). Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.
Respons JSON yang dikembalikan dalam permintaan HTTP yang sama (sinkron). README di halaman ini menyertakan contoh respons.
Tidak. WeChat MP Article Link Conversion berjalan melalui SandBase, jadi satu kunci API SandBase mencakup endpoint ini dan setiap API serta model lain di katalog. Anda tidak perlu mendaftar akses API WeChat MP secara terpisah.