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
Anil Kumar 1257Anil Kumar 1257 

How to integrate third party sms .i want integrate third party sms and send the sms my org please tell me how can do that

global class Kit19SMS  {
    global String sendMessage(List<String> numbers, String message){
        
        system.debug('sent sms done');
        
        String num = String.join(numbers,','); 
        String user;
        String pass;
        String send;
        
        API_Credentials__mdt[] logcredentials = [Select id,Username__c,password__c,senderId__c FROM API_Credentials__mdt WHERE developername = 'Kit19' LIMIT 1];
        for(API_Credentials__mdt login:logcredentials){
            
            user = login.Username__c;
            pass = login.password__c;
            send = login.senderId__c;  
        }
        
        system.debug('user=='+user);
         system.debug('pass=='+pass);
         system.debug('send=='+send);
        
        HttpRequest req = new HttpRequest();
        req.setHeader('Content-Length', '0');
        req.setEndpoint('https://www.kit19.com/ComposeSMS.aspx?username='+ user +'&password='+ pass +'&sender='+ send +'&to=' + num + 
                        '&message=' + EncodingUtil.URLENCODE(message,'UTF-8')  + '&priority=1&dnd=1&unicode=0');
        req.setMethod('POST');
        system.debug('EndPoint========'+req);
        system.debug('Sent========');
        Http http = new Http();
        //if (test.isRunningTest()) Test.setMock(HttpCalloutMock.class, new MockHttpResponseGenerator());
        
        try{
            HTTPResponse res = http.send(req);
            system.debug('response' + res);
        }
        catch(Exception e){
            system.debug('Exception e' + e);
        }
        return null;
    }
    global String sendPersonalizedMessage(String numbers, Id templateId){
        return null;
    }
}
rohan sharma 72rohan sharma 72
Here is the list of best anti-pollution masks to keep yourself safe from polluted air around. If you were looking for the best masks for pollution, check this list of best air pollution masks. 
pollution mask (https://pollutionmask.co/)



 
rohan sharma 72rohan sharma 72
Here is the list of best anti-pollution masks to keep yourself safe from polluted air around. If you were looking for the best masks for pollution, check this list of best air pollution masks.


https://pollutionmask.co/
SwethaSwetha (Salesforce Developers) 
HI Anil,
The below thread might be helpful
https://developer.salesforce.com/forums/?id=906F00000008s03IAA
 
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful.
 
Thank you
Maryann DinapoliMaryann Dinapoli
Rohan Sharma 72, thanks for the useful source with anti-pollution masks. I am a student participating in many activist events concerning environment essays about green issues. I checked so many statistics on pollution, and I urge the community to get involved in Earth's protection. https://envrexperts.com/ is the service that helps me with my writing homework for biology and offers papers with data about different environmental problems. I hope that more and more teens will check the source of essays and get greener.