question

Aleksandar Puseljic avatar image
Aleksandar Puseljic asked Aleksandar Puseljic answered

RC API call not listing only call queues

Using your code suggestion from your API reference on how to list call queues

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

I have written the below to try to return a list of Call Queues. Unfortunately, it lists Call Queues AND all extensions. Can you help me with this? I don't understand why its reporting on all extensions when it is supposed to be referencing the call-queues rest API

r = platform.get('/restapi/v1.0/account/~/call-queues')

jsonR = resp.json()

for record in jsonR.records:

print(f'|Extension: {record.extensionNumber}', end="")

print(f'| Name: {record.name}')



rest apicall queues
1 |3000

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 Aleksandar Puseljic commented

That API must return only call queue extensions. Is this your sandbox account? If so, can you provide the account main company number and the name of an extension which is not a call queue extension, that returned by this API?

If this is a production account, please provide the account name and and the name of an extension which is not a call queue extension, that returned by this API?

2 comments
1 |3000

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

Aleksandar Puseljic avatar image Aleksandar Puseljic commented ·

This is my Sandbox account. The main number for the sandbox is 16167470074 and it is returning the below results

|Extension: 101| Name: Aleksandar Puseljic

|Extension: 102| Name: Tony Stark

|Extension: 103| Name: Hank Pym

|Extension: 100| Name: Personal Lines

|Extension: 200| Name: Commercial Lines


Only ext 100 and 200 are call queues, the rest are user ext.

0 Likes 0 ·
Aleksandar Puseljic avatar image Aleksandar Puseljic Aleksandar Puseljic commented ·

I figured it out. I had another variable in my code and elsewhere which was pulling extensions and i accidentally assigned it the respo.json() variable. My mistake as an amateur coder.

0 Likes 0 ·
Aleksandar Puseljic avatar image
Aleksandar Puseljic answered

for anyone visiting this thread:

r = platform.get('/restapi/v1.0/account/~/call-queues')

jsonR = resp.json()

I wasn't calling the 'r' variable, I was calling the 'resp' variable from other code and thats why i was getting an incorrect printout

1 |3000

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