function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ram ChaturvediRam Chaturvedi 

I am getting a error when requesting for refresh token. {"error_description":"expired access/refresh token","error":"invalid_grant"}

HttpRequest request =new HttpRequest(); 
             request.setEndpoint('https://login.salesforce.com/services/oauth2/token');
             request.setMethod('POST');            
             request.setBody('grant_type=refresh_token&client_id='+Cid+'&client_secret='+ScrId+'&refresh_token='+OldAccessToken+'');

             Http htp = new Http();
             HTTPResponse res = htp.send(request);
      NewAccessToken =  res.getBody();  

responce:        {"error_description":"expired access/refresh token","error":"invalid_grant"}