Fax “from” and “callerId” parameters missing from RingCentral fax API

孤人 提交于 2019-12-13 01:44:09

问题


I've been trying to send fax using RingCentral API but there is no way to specify the From fax phone number to send the fax. It is only sending the fax using company fax number. I am not able to find the option to use fax from number. I am using the following end point for sending fax:

https://platform.ringcentral.com/restapi/v1.0/account/:accountId/extension/:extensionId/fax


回答1:


In the RingCentral system, the From (or sending) fax number is the fax caller ID value. You can update this for your extension to use with your faxes, but the value is not available in the send fax API itself. To change this on a per send basis, you can update the caller ID value before each fax request.

You can update the Fax Caller ID using two approaches:

  1. via API or
  2. using the Online Account Portal (https://service.ringcentral.com), both of which are described below.

Both are described below. Let me know if this works for you.

1) Updating the Fax Caller ID

To update the fax caller ID, call the PUT extension/caller-id endpoint and update the callerId for the FaxNumber feature using the phone number ID of the number you are interested in using. You can get a list of this by calling the extension/phone-number shown in the next section.

PUT /restapi/v1.0/account/{accountId}/extension/{extensionId}/caller-id
Authorization: Bearer {accessToken}
Content-Type: application/json

{
  "byFeature": [
    {
      "feature": "FaxNumber",
      "callerId": {
        "phoneInfo": {
          "id": 33333333
        }
      }
    }
  ]
}

See the API Reference for more: https://developer.ringcentral.com/api-docs/latest/index.html#!#RefUpdateCallerId

1.1) Listing Your Available Caller ID Numbers

To get a list a list of numbers you can use, call the GET extension/phone-number endpoint:

GET /restapi/v1.0/account/{accountId}/extension/{extensionId}/phone-number
Authorization: Bearer {accessToken}

In your JSON response, you will have a list of phone numbers in the records property. Numbers that you can use will have the following property values:

  • features property will have the CallerId value
  • type property will be set to VoiceFax or FaxOnly

The following is the excerpt of a JSON response showing one number. You should have more numbers and a paging object.

{
  "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/phone-number?page=1&perPage=100",
  "records": [
    {
      "id": 33333333,
      "phoneNumber": "+16505550100",
      "paymentType": "Local",
      "location": "Belmont, CA",
      "type": "VoiceFax",
      "usageType": "DirectNumber",
      "status": "Normal",
      "country": {
        "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/dictionary/country/1",
        "id": "1",
        "name": "United States"
      },
      "features": [
        "SmsSender",
        "CallerId",
        "MmsSender"
      ]
    }
  ]
}

See the API Reference for more: https://developer.ringcentral.com/api-docs/latest/index.html#!#RefUserPhoneNumbers.html

1.2) Reading The Fax Caller ID Value

RingCentral supports multiple caller ID values. To read the value for your extension make the following API call to the extension/caller-id endpoint:

GET /restapi/v1.0/account/{accountId}/extension/{extensionId}/caller-id
Authorization: Bearer {accessToken}

You will receive a response like the following with an array of caller ID values in the byFeature property. Look for the feature with the feature property set to FaxNumber. I only show the FaxNumber feature caller ID below, but the array includes the following features: CallFlip, FaxNumber, RingMe, RingOut, MobileApp, Alternate.

{
  "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/caller-id",
  "byFeature": [
    {
      "feature": "FaxNumber",
      "callerId": {
        "type": "PhoneNumber",
        "phoneInfo": {
          "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/11111111/phone-number/33333333",
          "id": "33333333",
          "phoneNumber": "+16505550100"
        }
      }
    }
  ]
}

See the API Reference for more: https://developer.ringcentral.com/api-docs/latest/index.html#!#RefGetCallerId

2) Using the Online Account Portal

You can also change the Caller ID value in the Online Account Portal under:

Settings > Outbound Calls > Caller ID > By Feature > Fax Number

More is available in this Knowledgebase Article:

https://success.ringcentral.com/articles/RC_Knowledge_Article/3614



来源:https://stackoverflow.com/questions/50099677/fax-from-and-callerid-parameters-missing-from-ringcentral-fax-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!