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
Ramesh SomalagariRamesh Somalagari 

Unauthorized endpoint, please check Setup->Security->Remote site settings endpoint

Hi all this my code I got the exception below,I unable to send the SMS twilio API. Please some one help me

**ERROR :** Unauthorized endpoint, please check Setup->Security->Remote site settings endpoint: uerl
Where should I add the twilio URL?

    global class SampleSMSTest
        {  
        @future (callout=true)
        Public static void testsms(){
        try{
        String account = 'xxxxxxxxx';         
        String token = 'xxxxxxxxxx';
        TwilioRestClient client = new TwilioRestClient(account, token);          
        Map<String,String> params = new Map<String,String> {
        'To'   => '+91953835xxxx',
        'From' => '+1920569xxxx',//twilio register number
         'Body' => 'Hello there!'         
          };
           TwilioMessage message = client.getAccount().getMessages().create(params);       
                }catch(exception e){
                system.debug('Main error==========>'+e);}
            }
        }
nbknbk
Have you created the remote site url 'twilio' through this navigation (Setup->Security->Remote site settings endpoint) , if not please add and make it as 'Active'