渠道方GET
列出渠道區域
回傳渠道已經開通嘅區域清單。supported 表示渠道係咪喺呢個區域可用;allocatable 表示目前係咪可以喺呢個區域綁定新帳號。
https://api.unifyport.ai/v1/providers/{provider}/regions請求標頭
X-Api-Keystring必填
工作區 API Key,工作區會由呢個標頭解析得出嚟。
路徑參數
providerstring必填
用嚟識別嗰條 providers 路由嘅 ID。
enum: telegram, whatsapp, line, twitter, zalo, tiktok, whatsapp_protocol, x, x_client, twitter_client
請求內容
呢個介面唔需要 JSON 請求內容。
回應內容
providerstring
今次回傳區域可用性嘅渠道。
enum: telegram, whatsapp, line, twitter, zalo, tiktok, whatsapp_protocol
regions[]object[]區域列表,每一項都有 supported 同 allocatable。
regions[]object[]
區域列表,每一項都有 supported 同 allocatable。
regionstring
渠道部署區域識別碼。
supportedboolean
渠道有冇喺呢個區域運行。
allocatableboolean
而家可唔可以喺呢個區域分配新帳號。
回應
200200 OK
請求成功,回應內容嘅例子如上。
400請求錯誤
請求內容、路徑或者參數無效。
401未授權
X-Api-Key 請求標頭缺少或者無效。
500伺服器錯誤
服務遇到咗未預期嘅錯誤。
請求
curl -X GET https://api.unifyport.ai/v1/providers/{provider}/regions \
-H "X-Api-Key: <YOUR_API_KEY>"回應
{
"data": {
"provider": "telegram",
"regions": [
{
"region": "global",
"supported": true,
"allocatable": true
}
]
}
}