Here's one of our developers with a question on how to retrieve accountId and extensionId from your RingCentral account.
"Parameter accountId is required in most of the API resources, may I know what is the account Id in sandbox account? Or where is it found?"
--------------------------------------------------------------------------------------------------------------------------------
The RingCentral service allows its customers to create and register an account that is usually associated with the customer's company. After registering the account with the company main number the user can create extensions of different types and functionality. The extensions can further be assigned with the phone numbers and phone devices.
All the account related link could be looked up in the "Exploring Account and Extension settings" section of our Developers guide here
https://developer.ringcentral.com/api-docs/latest/index.html#!#ExploringAccount.html
To retrieve the currently authorizing user's accountId
, make an API call to the /restapi/v1.0/account/~
API endpoint which will return the object for the user's account. The accountId
will be located in the response id
property value.
How can I retrieve my extensionId (Where could I lookup my Extension ID)?
To retrieve the currently authorizing user's extensionId
, make an API call to the /restapi/v1.0/account/~/extension/~
API endpoint which will return the object for the user's extension. The extensionId
will be located in the response id
property value. This will indirectly return the user's accountId
in the user's canonical URI which is in the response uri
property value.
Miami Video Production Company
,Amazing
Here is what my error log is indicating:
2017-09-27 14:06:47,478 [10] ERROR PRIS.RingCentral.MessagesService - Message:
Request rate exceededSource:
RingCentralMethod Causing Error:
Void .ctor(System.Net.Http.HttpResponseMessage, System.Net.Http.HttpRequestMessage)Stack Trace:
at RingCentral.Http.ApiResponse..ctor(HttpResponseMessage response, HttpRequestMessage request)
at RingCentral.Platform.Send(HttpMethod httpMethod, Request request)
at RingCentral.Platform.Get(Request request)
at PRIS.RingCentral.MessagesService.GetAttachmentContent(ParamsForContentDownloads downloadParams, String& result) in c:\Projects\DotNet\PRIS-Framework\PRIS-Framework\PRIS.RingCentral\Services\MessagesService.cs:line 106
Here is where I make the call in MessagesService.cs:line 106
var txtToBytes = Encoding.UTF8.GetBytes(string.Format("{0}:{1}", Settings.AppKey, Settings.AppSecret));
string encodedText = Convert.ToBase64String(txtToBytes);
// Create request with proper authorization.
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, downloadParams.Attachment.Uri);
request.Headers.TryAddWithoutValidation("Content-Type", @"application/x-www-form-urlencoded;charset=UTF-8");
request.Headers.Add("Authorization", string.Format("Basic {0}", encodedText));
// Handle response
var response = Client.RcPlatform.Get(new Request(request.RequestUri.AbsolutePath));
// Get extension type
result = ExtensionHelpers.GetDefaultExt(response.Headers.ContentType.MediaType);
// Get the binary
return Encoding.ASCII.GetBytes(response.Body);
What is strange is that I get a file with varying sizes in kb, but there is not content. For example when I open a pdf, it's blank or if I attempt to open a sound file, it doesn't play anything. Am I handling this correctly?
Please clarify your situation and your question if you need further help.
Get Extensions ( API Endpoint )
This API returns the list of extensions created for a particular account. All types of extensions are included in this list. Every extension is associated with a parameter named id, for more information you can take a look at the sample request and response here:
https://developer.ringcentral.com/api-docs/latest/index.html#!#RefExtensionList.html
GET https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/messsage-storeMore details can be found here: http://developer.ringcentral.com/api-docs/latest/index.html#!#Resources.html
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