-
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
5 Significant Benefits of Salesforce CRM Testing
Providing superior customer service is no longer a choice for businesses, it has rather become a necessity to sustain in this competitive world. However, providing…
Always Implement 2FA when providing web services on top of Salesforce
How many time have you herd the sentence “SECURITY is never enough” ? especially in IT and digital services we always add new fences, walls…
Salesforce Announced The End of Life of Permissions on Profiles | The Developer Guide
The time has finally arrived when Salesforce recently announced that the Spring '26 release would mark the end of life (EOL) for permissions on profiles.…
Popular Salesforce Videos
Introduction to Set & Map in Salesforce || What is Set || What is Map ||
From Salesforce instructor, Become a Salesforce Expert. A brief introduction about what is a Set, map, and what are their importance? Check out the video to…
Introduction To Salesforce Apex | DataType | Collection | Conditional Statements
In this video salesforce apex hours creators provides an introduction to Apex. Apex enables developers to access the Salesforce platform, back-end database and client-server interfaces…
How Salesforce Supports Veterans in the Workplace
Have you found community at your workplace? Tune in as Brian Kim, Account Executive, shares how Salesforce supports veterans in the workplace through Vetforce, our…