概览
This guide explains how to assign fax numbers to corporate users through the Fax.Plus API. 您将学习如何列出公司成员,向特定用户分配号码,并在需要时撤销号码指派。
必备条件
- 活跃的 Fax.Plus 企业账户
- 有效的 API 凭据
- 两个或多个传真号码在您的帐户
步进指南
-
列出公司成员
首先,检索您公司帐户中所有成员的列表。 This endpoint can be accessed only by Admin accounts.GET /v3/accounts
{
Important: Note down the
"members": [
{
"account_data": {
"company_name": "Company name",
"default_file_type": "pdf",
"save_history": true
},
"account_type": "corporate_admin",
"email": "John@sample.com",
"lastname": "Smith",
"status": "active",
"uid": "7724157c0974440293e45877c57f0703"
}
]
}UID
of the member you want to assign the number to. You'll need this in the next step.
Learn more: List corporate members - Fax.Plus API -
Assign a number to the user
Once you have the user'sUIU
, you can assign a fax number to them using the following endpoint:POST /v3/accounts/self/numbers/{number}
Request body:{
Replace
"assigned_to": "<uid>"
}{number}
in the URL with the actual fax number you want to assign, and theassigned_to
value with the user'sUIU
.
Learn more: Assign number - Fax.Plus API - Revoke number assignment
If you need to remove a number assignment from a user, use this endpoint:DELETE /v3/accounts/{user_id}/numbers/{number}
Learn more: Revoke number - Fax.Plus API
Parameters:
-
user_id
ID用户要吊销以下的数字 -
号码
传真号码从用户中删除
-
故障排除
共同问题和解决办法
-
403 被禁止的错误
- 原因: 权限不足或非管理员账户
- Solution: Verify you're using an admin account and have the required API scopes
-
404 找不到错误
- 原因: 无效的用户ID或传真号码
- Solution: Double-check the user ID and fax number are correct
-
400 个错误请求错误
- 原因: 无效的请求格式或试图从管理员中删除一个数字
- Solution: Verify request format and ensure you're not trying to remove numbers from admin accounts