渠道方GET
列出渠道區域
回傳某個 provider 已開通的區域。supported 代表 provider 在該區域是否可運作;allocatable 代表目前是否可在該區域綁定新帳號。
https://api.unifyport.ai/v1/providers/{provider}/regions請求標頭
X-Api-Keystring必填
工作區 API Key,工作區會由此標頭解析得到。
路徑參數
providerstring必填
用於該 providers 路由的識別字。
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
}
]
}
}