-
What to do in case I am getting Rest API error?
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 objecttokenRequest.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
Log In to reply.
Popular Salesforce Blogs

What is Single Sign On (SSO)? How does it work in Salesforce?
Single Sign On by the name it is could be easily understood that single credentials to access multiple applications. It is a session service plus…

Learn Salesforce Einstein – Chapter 2 (AI Buddy Installation)
AI Buddy Installation 1. Login in the org, where you want to install the App. 2. Go to Download Page and click on the latest…

How to use Leaflet Map in Salesforce?
Leaflet Map: Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. The leaflet is designed with simplicity, performance, and usability in mind. Let's…
Popular Salesforce Videos
How to use Einstein Engagement Scoring in Salesforce Marketing Cloud
Cameron Robert shows how to gain actionable insights from the Einstein Engagement Scoring Dashboard in Salesforce Marketing Cloud, and talks through a few activity ideas…
Best Chrome Extensions for Salesforce
These are the best FREE Chrome Extensions to use with Salesforce. Installing Chrome extensions is the easiest way to enhance your experience on the Salesforce…
How Link Cartridge Development Can Your Business Storefront | Salesforce Link Cartridge
LINK Cartridge is a container for packaging and deploying program code and data, it’s structured in folders and subfolders for maximum efficiency.