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
basha skbasha sk 

How to maintain Session through apex REST API ?

   Hi Everyone,

               Apex class :
                here at endpoint for everytime i'm generating the session value and passing statically.

                session=apac1breez6wnxuiam7asee4hw this value i'm passing statically for everytime.Instead of that how to maintain the session
                through apex class.    
                global class AdobeConnectEvents{   
                @future (callout=true)
                global static void getParticipants(String username, String password,String url){  
                    Http http = new Http();
                    HttpRequest req =  new HttpRequest();  
                    HttpResponse res =  new HttpResponse();  
                    Blob headerValue = Blob.valueOf(username + ':' + password);
                    String authorizationHeader = 'BASIC ' +
                    req.setHeader('Authorization', authorizationHeader);              
                    req.setHeader('Content-Type', 'application/json');
                    try {
                        res = http.send(req);
                        System.debug('MyResult == :'+res.getBody());            
                    }catch(System.CalloutException e){
                           System.debug('Callout error: '+ e);              
                }//return res;

Thanks In Advance,