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
C#: Resource for parameter [accountId] is not found
Tags: getting started
Aug 7, 2020 at 7:37am   •   2 replies  •  0 likes
Caleb Bluesummers

I'm working on a sandbox account, trying to use the Get Extensions API. My code is as follows:


using System;
using System.Threading.Tasks;
using RingCentral;

namespace Send_SMS
{
    class Program
    {
        const string RINGCENTRAL_CLIENTID = "<sandbox-id>";
        const string RINGCENTRAL_CLIENTSECRET = "<sandbox-secret>";

        const string RINGCENTRAL_USERNAME = "<sandbox-username>";
        const string RINGCENTRAL_PASSWORD = "<sandbox-password>";
        const string RINGCENTRAL_EXTENSION = "101";

        const string RINGCENTRAL_PRESENCE_USER = "<sandbox-username>";
        const string RINGCENTRAL_PRESENCE_EXT = "101";


        static RestClient restClient;

        static void Main(string[] args)
        {

            restClient = new RestClient(RINGCENTRAL_CLIENTID, RINGCENTRAL_CLIENTSECRET, false);
            restClient.Authorize(RINGCENTRAL_USERNAME, RINGCENTRAL_EXTENSION, RINGCENTRAL_PASSWORD).Wait();
            get_presence().Wait();

        }
 
        static private async Task get_presence()
       {
            var response = await restClient.Restapi().Account(RINGCENTRAL_PRESENCE_USER).Extension().List(listExtensionsParameters);

            Console.WriteLine("Extension for Test Account: " + response);
        }

    }
}


Where anything in <> is taken from the https://developers.ringcentral.com/my-account.html#/application-credentials site.


I was able to do the Send_SMS tutorial successfully, but for this, I'm getting:


Content: {

"errorCode" : "InvalidParameter",

"message" : "Resource for parameter [accountId] is not found",

"errors" : [ {

"errorCode" : "CMN-102",

"message" : "Resource for parameter [accountId] is not found",

"parameterName" : "accountId"

} ],

"parameterName" : "accountId"

}


What am I missing here?

2 Answers
answered on Aug 7, 2020 at 8:15am  


Is this the correct AccountId to use?


When I click your link, I get:


{  "errorCode" : "AGW-404",  "message" : "Resource not found",  "errors" : [ ] }

 0
answered on Aug 7, 2020 at 7:55am  

Maybe the account number you are providing might not actually belong to the Organization or the account itself.

Check the account number and provide the correct number or '~' ( tilde ) should work for the logged-in user.

You can use https://platform.devtest.ringcentral.com/restapi/v1.0/account/~ to get your account id number


 0



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