News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Can I add an user to multiple queues?
Tags: call queues, permissions, rest api
Nov 20, 2020 at 11:15am   •   1 replies  •  0 likes
Nate Breeden

Trying to add a user to multiple queue's using the below script, my goal is not to have to make individual calls for each queue and instead make one call to add them to all necessary queues. Is this possible?


I read somewhere else about someone wanting to do it in Java which is how I made the below script(using Python), which gives me errors so I'm not sure if I have things wrong here:

body = {
        'records': {
            'id': _queueAdd[0],
            'id': _queueAdd[1],
            'id': _queueAdd[2],
            'id': _queueAdd[3],
        },
    },
r = platform.get(f'/restapi/v1.0/account/~/extension/{extensionId}/call-queues', body)

Thinking maybe 'records' is what was breaking it, I removed that from the body as shown below, still no success. Thinking maybe the error below this script might be my issue, and I need to be given more permissions to the account calls?

body = {
    'id': _queueAdd[0],
    'id': _queueAdd[1],
    'id': _queueAdd[2],
    'id': _queueAdd[3],
    },
r = platform.get(f'/restapi/v1.0/account/~/extension/{extensionId}/call-queues', body)



When trying through the link below and clicking "Try It Out" through the API references it says:

{
"errorCode":"InsufficientPermissions"
"message":"In order to call this API endpoint, application needs to have [Accounts] permission"
"errors":[
0:{
"errorCode":"CMN-401"
"message":"In order to call this API endpoint, application needs to have [Accounts] permission"
"permissionName":"Accounts"
}
]
"permissionName":"Accounts"
}

Link: https://developers.ringcentral.com/api-reference/Call-Queues/updateUserCallQueues


Could there be other permissions I don't have under Accounts? If so can I have those permissions?

1 Answer
answered on Nov 22, 2020 at 8:31am  

First of all, you have to make a PUT instead of a GET to update something

r = platform.put('/restapi/v1.0/account/~/extension/{extensionId}/call-queues', body)

Secondly, it looks like your app does not have the Account permission. You'll need to submit a support ticket to help change this.


 0
on Nov 22, 2020 at 1:14pm   •  0 likes

Phong, thanks again for your help. Sorry, I feel silly for not knowing that, but I'm still learning API calls and assumed GET just transmitted the information you're requesting/changing, but makes sense that there is a way to differentiate the two. Need to go back to reading more about how they work.


I'll send the request over for the permissions, thanks again.



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us