如何使用Fax.Plus API分配传真号码?

谁可以使用此功能?

Enterprise Plan

所有者和管理员。

概览

This guide explains how to assign fax numbers to corporate users through the Fax.Plus API. 您将学习如何列出公司成员,向特定用户分配号码,并在需要时撤销号码指派。

必备条件

  • 活跃的 Fax.Plus 企业账户
  • 有效的 API 凭据
  • 两个或多个传真号码在您的帐户

步进指南

  1. 列出公司成员
    首先,检索您公司帐户中所有成员的列表。 This endpoint can be accessed only by Admin accounts.
    GET /v3/accounts

    {
    "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"
    }
    ]
    }
    Important: Note down the UIDof 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
  2. Assign a number to the user
    Once you have the user's UIU, you can assign a fax number to them using the following endpoint:
    POST /v3/accounts/self/numbers/{number}
    Request body:
    {
    "assigned_to": "<uid>"
    }
    Replace {number} in the URL with the actual fax number you want to assign, and the assigned_tovalue with the user's UIU.
    Learn more: Assign number - Fax.Plus API
  3. 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_idID用户要吊销以下的数字
    • 号码传真号码从用户中删除

故障排除

共同问题和解决办法

  1. 403 被禁止的错误
    • 原因: 权限不足或非管理员账户
    • Solution: Verify you're using an admin account and have the required API scopes
  2. 404 找不到错误
    • 原因: 无效的用户ID或传真号码
    • Solution: Double-check the user ID and fax number are correct
  3. 400 个错误请求错误
    • 原因: 无效的请求格式或试图从管理员中删除一个数字
    • Solution: Verify request format and ensure you're not trying to remove numbers from admin accounts

 

这篇文章有帮助吗?
0 人中有 0 人觉得有帮助
More Articles in this section