question

nikolay-naau12016 avatar image
nikolay-naau12016 asked victor-shisterov38 answered

How use method Create Company Call Handling Rule ? Always has error "Parameter [callerId] value is invalid"

Not working method  Create Company Call Handling Rule by Api. Always error "Parameter [callerId] value is invalid". But i try phone number in different formats. Try extension ID, number id also. Maybe somebody know how Create Company rule by API. Which caller id is correct?
General Topic
1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Tyler Liu avatar image
Tyler Liu answered
Are you trying the API Explorer? Or could you please post your code?
1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

victor-shisterov38 avatar image
victor-shisterov38 answered
Just tried this one:

POST https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/answering-rule
{
  "enabled": true,
  "callers": [
    {
      "callerId": "+15551234567"
    }
  ]
}

and the response looks fine:

HTTP 200 OK
{
                 
  "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/.../answering-rule/198652004",
  "id": "198652004",
  "type": "Custom",
  "name": "My Rule 1",
  "enabled": true,
  "callers": [
    {
      "callerId": "15551234567"
    }
  ],
  "greetings": [
    {
      "type": "Company",
      "preset": {
        "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/dictionary/greeting/262145";,
        "id": "262145",
        "name": "Company Greeting"
      }
    }
  ],
  "callHandlingAction": "Operator"
}

So, as Tyler already asked, could you please provide your API request?
1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys