Question

Error code 404 and CMN-102 even if the subscription exists.

  • 7 November 2020
  • 2 replies
  • 488 views

Following is our subscription id - 0a84e146-ca2b-4577-9d49-e784a8cdc1e3. When we try to renew it from our code, it throws a 404 error. We are able to renew it from the API reference page.

Following is our code.

try
            {
                using (RestClient rc = new RestClient("tOwXT1UcSMOKodEO6-PCFw"
                                                    , RINGCENTRAL_CLIENTSECRET
                                                    , true))
                {
                    TokenInfo token = await rc.Authorize("+16822823056"
                                                        , RINGCENTRAL_EXTENSION
                                                        , RINGCENTRAL_PASSWORD);

                    if (rc.token.access_token.Length > 0)
                    {
                        subscriptionInfo 
                            = await rc.Restapi()
                                .Subscription("0a84e146-ca2b-4577-9d49-e784a8cdc1e3")
                                .Renew()
                                .Post();
                    }
                }
            }
            catch (FlurlHttpException fhEx)
            {
                ins_error_log log = new ins_error_log();
                log.runSP(fhEx, false);
            }
            catch (ObjectDisposedException odEx)
            {
                ins_error_log log = new ins_error_log();
                log.runSP(odEx, false);
            }
            catch (Exception ex)
            {
                ins_error_log log = new ins_error_log();
                log.runSP(ex, false);
            }



2 replies

Following are the list of subscription ID that were created, but cannot be renewed using the code or web portal

8a8154a5-4844-4b66-9a76-aebac7081d89

ddba9f85-660e-44a2-a547-88104516fa691604802117536.png

Userlevel 1

This subscription id "0a84e146-ca2b-4577-9d49-e784a8cdc1e3" is not listed in your reference list. Can you call the list subscription API to read all subscriptions and check if the subId above does exist?

Reply