Toggle Side Panel

  • Home
  • Articles
    • All Articles
    • Blogs
    • Videos
    • Infographics
  • Consultants
    • Salesforce Product Expertise
      • Top Salesforce ConsultantsTop Salesforce Consultants
      • Marketing Cloud ConsultantsMarketing Cloud Consultants
      • Service Cloud ConsultantsService Cloud Consultants
      • Experience Cloud ConsultantsExperience Cloud Consultants
      • Analytics Cloud ConsultantsAnalytics Cloud Consultants
    • Salesforce Industry Expertise
      • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
      • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
      • Health Cloud ConsultantsHealth Cloud Consultants
      • Commerce Cloud ConsultantsCommerce Cloud Consultants
      • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
    • Salesforce Experts by Location
      • USATop Salesforce Consultants in USA
      • IndiaTop Salesforce Consultants in India
      • AustraliaTop Salesforce Consultants in Australia
      • United KingdomTop Salesforce Consultants in UK
      • CanadaTop Salesforce Consultants in Canada
  • Webinars
  • Marketplace
  • Advertise With Us
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Home
    • Articles
      • All Articles
      • Blogs
      • Videos
      • Infographics
    • Consultants
      • Salesforce Product Expertise
        • Top Salesforce ConsultantsTop Salesforce Consultants
        • Marketing Cloud ConsultantsMarketing Cloud Consultants
        • Service Cloud ConsultantsService Cloud Consultants
        • Experience Cloud ConsultantsExperience Cloud Consultants
        • Analytics Cloud ConsultantsAnalytics Cloud Consultants
      • Salesforce Industry Expertise
        • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
        • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
        • Health Cloud ConsultantsHealth Cloud Consultants
        • Commerce Cloud ConsultantsCommerce Cloud Consultants
        • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
      • Salesforce Experts by Location
        • USATop Salesforce Consultants in USA
        • IndiaTop Salesforce Consultants in India
        • AustraliaTop Salesforce Consultants in Australia
        • United KingdomTop Salesforce Consultants in UK
        • CanadaTop Salesforce Consultants in Canada
    • Webinars
    • Marketplace
    • Advertise With Us
    • Contact Us
    • Discussions
    Close search

    Activity › Forums › Salesforce® Discussions › What to do in case I am getting Rest API error?

    Tagged: Access Token, Debug in Salesforce, Get and set Methods, HTTP GET, HTTP POST, HTTP Request, JSON Deserialization, Login URL, Old Version, Rest API, REST API Error, Salesforce Apps, Salesforce Code, Salesforce Error

    • Salesforce® Discussions

      What to do in case I am getting Rest API error?

      Posted by Rahul on January 30, 2018 at 8:33 AM

      HI,
      I updated my http request code but now I am getting an error "You are running an old version of the app. Please upgrade to the latest version".
      here is my code of calling access token:-

      public string getAccessTokenNew(){
      String strEndpointUrl='';
      HttpRequest tokenRequest = new HttpRequest();
      if(objZoomtechConfig !=null){
      strEndpointUrl = objZoomtechConfig.RV_Login_URL__c;
      tokenRequest.setBody('grant_type=password&client_id=zoom-dev1-client&session_reset=no&username='+objZoomtechConfig.RV_Username__c + '&password='+ objZoomtechConfig.RV_Password__c);
      }
      //Creating Http request object

      tokenRequest.setendpoint(strEndpointUrl);
      tokenRequest.setHeader('Content-Type', 'application/x-www-form-urlencoded');
      tokenRequest.setmethod('POST');
      Http objHttp = new Http();
      HttpResponse res = objHttp.send(tokenRequest);  // here response is [Status=OK, StatusCode=200]
      system.debug('@@'+res.getBody()); // but here i am getting this  DEBUG |@@ {"response":null,"status":"FAILURE","errorMessage":"You are running an old version of the app. Please upgrade to the latest version."}
      objResponse = (responseClass)JSON.deserialize( res.getBody(),responseClass.Class);

      if(objResponse.response != NULL){
      strAccessToken = objResponse.response.access_token;
      system.debug('@@@'+strAccessToken);
      objZoomtechConfig.Access_Token__c = objResponse.response.access_token;
      objZoomtechConfig.Expires_In__c= Decimal.valueOf(objResponse.response.expires_in);
      objZoomtechConfig.Token_Generation_Time__c = System.now();
      update objZoomtechConfig;
      }

      Please guide me, why i am getting this issue?

      thanks,
      Rahul Kumar

      Rahul replied 8 years, 3 months ago 2 Members · 2 Replies
      • Access Token
      • Debug in Salesforce
      • Get and set Methods
      • HTTP GET
      • HTTP POST
      • HTTP Request
      • JSON Deserialization
      • Login URL
      • Old Version
      • Rest API
      • REST API Error
      • Salesforce Apps
      • Salesforce Code
      • Salesforce Error
    • 2 Replies
    • Manpreet

      Member
      January 30, 2018 at 10:32 AM

      Hi Rahul,

      API version is defined in different different ways depending on what you are doing with it.

      SOAP API calls
      REST API calls
      Apex
      Visualforce
      All of these (and other features that use API) are fixed in the code you write against them, allowing you to upgrade/update when it fits your company/project lifecycle. Integration uses different end points. Apex and Visualforce use metadata to define the version.

      Essentially there is only ever one version of Salesforce in production. Previous versions of the API are emulated for the purpose of integration and code resilience.

      So when you write your REST request (as that's what you've been using), you will use a URL like this, for instance:

      HTTP:GET
      /services/data/v26.0/sobjects/account/001B0000003nJhxxxx

      The v26.0 segment of the URL path is what stipulates the version. You can substitute any other previous or later version up to the current version (v33.0 for Spring 15, the current release).

      n some instances you will get a response, but a different result. For instance these two GETendpoints:

      /services/data/v26.0/sobjects/account/001B0000003nJhJIAU
      /services/data/v33.0/sobjects/account/001B0000003nJhJIAU

      The second returns a few extra fields that were added in the ensuing versions.So manage your strEndpointUrl in the code.

       

      Thanks.

    • [adinserter block='9']
    • Rahul

      Member
      January 31, 2018 at 5:28 AM

      Thanks for reply manpreet, but i am not calling such endpoint so i am not getting your point.
      I am just calling two api's , in first i am generating the access_token and then uudating this new access token in custom setting. and next to using second api which will take data from sfdc to java applicaion.
      now in first case, as i am calling the httpRequest then status is 200Ok but getting this error message

      error "You are running an old version of the app. Please upgrade to the latest version" which is working fine in sandbox.
      how to fetch this fault, it's important to me to solve ASAP.
      Someone please guide me soon!

      Thanks,

      Rahul Kumar

    Log In to reply.

    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me

    [adinserter block="12"]

    Popular Salesforce Blogs

    How TLS impacts Salesforce?

    How TLS impacts Salesforce?

    Blog in Others

    When we are working in a pool of networks i.e INTERNET, we need a protocol. Yes, you might have heard this term in your High…

    Salesforce in News, Salesforce News, Salesforce Training, TLS 1.1, TLS in Salesforce
    Manpreet Apr 19, 2018
    3,933  Views

    The Ultimate Guide to Salesforce Implementation in 2021

    Blog in Salesforce Implementation

    Technology is growing at a lightning speed. But if we look around, we still use Excel, notepad to scribble information about meetings and customers. Don’t…

    Apex Web Services, Approvals, Automations, Bad data, Best Practices
    Cloudideas Jun 4, 2021
    2,395  Views
    Data Classification in Salesforce

    Protect your Data with Data Classification in Salesforce

    Blog in Data

    Happy Cybersecurity Awareness Month (CSAM)! Did you know that the loss of critical, and often sensitive, information can severely impact the profitability and innovation of your…

    Business-critical Financial Records, Classify Data, Cleanup Project, Compliance Categorization, Confidential Data
    Netwrix Oct 18, 2021
    5,761  Views

    Popular Salesforce Videos

    Picklist fields in Salesforce Flow

    Picklist fields in Salesforce Flow

    Video in Salesforce Apex, Salesforce Training

    In this video, we will talk about how to create picklist fields in Salesforce Screen flow. Below is the timestamp for your reference. Input Elements…

    Salesforce Training, salesforce, Salesforce Flow, Salesforce Video, Salesforce Learning
    Prafull Oct 21, 2021
    2,993  Views
    Salesforce Trailhead 2020 - Queueable Apex - Challenge

    Salesforce Trailhead 2020 - Queueable Apex - Challenge

    Video in Salesforce Apex, Salesforce Training

    Create an Queueable Apex class that inserts Contacts for Accounts. Create a Queueable Apex class that inserts the same Contact for each Account for a…

    Salesforce Training, Salesforce Apex, Apex Class, salesforce, Salesforce Trailhead
    Jogender May 19, 2020
    5,530  Views
    How to Use Dispatcher Console in Salesforce Field Service? | Elevate Field Service Delivery | AblyPro

    How to Use Dispatcher Console in Salesforce Field Service? | Elevate Field Service Delivery | AblyPro

    Video in Salesforce Field Service Platform

    Dispatcher Console makes field service delivery easy for your business. Using the Dispatcher Console included in the Field Service package, your dispatchers can easily schedule,…

    Salesforce Tutorial, Salesforce Video, Salesforce Field Service, Tools, Consultation
    AblyPro Oct 24, 2023
    980  Views
    Footer Forcetalks logo

    support@forcetalks.com

    • twitterx

    Quick Links

    Advertise with Us

    Salesforce® Articles

    Dreamforce 2023

    Top Salesforce® Bloggers 2023

    Top Salesforce Consultants

    Get Listed

    Company

    Contact Us

    About Us

    Privacy Policy

    Terms & Conditions

    InsightHub

    Salesforce Blogs

    Salesforce Videos

    Salesforce Groups

    Salesforce Jobs

    © 2026 - Forcetalks ● All Rights Reserved

    Salesforce® is a trademark of Salesforce® Inc. No claim is made to the exclusive right to use “Salesforce”. Any services offered within the Forcetalks website/app are not sponsored or endorsed by Salesforce®.

    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.