Skip to main content
Question

How do I create an extension and role for an user with API?

  • September 12, 2019
  • 4 replies
  • 2714 views

I am trying to create an extension for the user with passing roles in the json body. But I am getting errors 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

PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • September 12, 2019

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 submit a support ticket to ask for accessing the read roles API. Please mention me on your request so I can talk to the support engineer.

+ Phong Vu


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.


  • New Participant
  • June 15, 2021

@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.


@eric-olsen

It appears to assign/change a user's Role the Role Management APIs need to be used.

Any Role in the Account's inventory can be set as the Default Role. That implies all new users/extensions created will get that Role. I haven't seen where an existing Role can be specified in any of the Provisioning APIs (Extensions nor SCIM).


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings