question

Naveen Mula avatar image
Naveen Mula asked ·

Create Extension and role for user with API

I am trying to create extension for the user with passing roles in the json body. But i am getting error saying roles parameter is not valid. I am using string and role id. Can you let us know how this API works. Wihtout passing roles i am able to create extension

extension api
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.

Phong Vu avatar image
Phong Vu answered ·

First of all, the roles param is optional and I believe the default value is the "Standard User". The roles param is an array of object which has the "id" and "uri", which are internal values. For some reason we have no public API to query roles so it seems you can't define the roles param when creating an extension using API.

Please send a request to devsupport@ringcentral.com to ask for accessing the read roles API. Please mention me on your request to I can talk to the support engineer.

+ Phong Vu

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.

Anirban avatar image
Anirban answered ·

Just to add, as you can go through the API documentation here

https://developers.ringcentral.com/api-reference/Extensions/createExtension

As already mentioned in previous answer, roles param is optional so that's the reason you are able to create extension without issue. Please go the document carefully, you can get details of the API and each parameter description. You can even test you API here.

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.

eric-olsen avatar image
eric-olsen answered ·

@Anirban That doesn't answer OP's original question about if a role can be assigned via API. While yes, the role parameter is optional, as you stated, OP is requesting to know how to change the role if necessary/desired.

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