You need to sign in to do that
Don't have an account?
Mohammad Azam
Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = http://bhashsms.in/api/sendmsg.php?user=xxx&pass=123456&sender=xxx&phone=90000003&text=Message&priority=sdnd&stype=normal
Hi
I am trying to SMS Gateway Integration. I am struck at a point.
I am invoking the class with Javascript button. So when the button is clicked, the sms is sent. But i am an errors. Please help.
My javaScript button code
My Apex Class
Error I am getting when i click the button or execute the class from dev console.
Please help
I am trying to SMS Gateway Integration. I am struck at a point.
I am invoking the class with Javascript button. So when the button is clicked, the sms is sent. But i am an errors. Please help.
My javaScript button code
{!REQUIRESCRIPT("/soap/ajax/15.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/15.0/apex.js")} var callout = "" + sforce.apex.execute("DisplaySMSQueueListViewRecords","SedingSMSManullay", {msg:"{!Customer__c.Vehicle__c}",phone:"{!Customer__c.Phone__c}"}); alert("SMS Sent");
My Apex Class
Global class DisplaySMSQueueListViewRecords { //variables @future(Callout=true) //Sending SMS Manually Webservice static void SedingSMSManullay(String msg,String phone) { String mobileNumber=phone; String SendSMSString = msg; Http h = new Http(); HttpRequest req = new HttpRequest(); req.setEndpoint('http://bhashsms.in/api/sendmsg.php?user=xxx&pass=123456&sender=xxx&phone='+mobileNumber+'&text='+SendSMSString+'&priority=sdnd&stype=normal'); req.setHeader('Accept', 'text/xml'); req.setHeader('Content-Type' , 'text/plain'); req.setMethod('GET'); HttpResponse res; if(!Test.isRunningTest()) res = h.send(req); // Responsebody =res.getBody(); System.debug('***********'+res); } }
Error I am getting when i click the button or execute the class from dev console.
00:11:22:020 FATAL_ERROR System.CalloutException: Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = http://bhashsms.in/api/sendmsg.php?user=xxx&pass=xxx&sender=xxx&phone=900000003&text=Message&priority=sdnd&stype=normalI tried adding the Endpoint URL in the Remote Site Setting as "http://bhashsms.com" but it is still throwing the same error.
Please help
All Answers
Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = https://eu40.salesforce.com/insights/internal_api/v1.0/esObject/workflow
Error is in expression '{!updateDataflowNames}' in page datamanager: Class.DataManager_Dataflow.httpGet: line 248, column 1
Class.DataManager_Dataflow.pullDataflows: line 73, column 1
Class.DataManager_controller.updateDataflowNames: line 299, column 1
An unexpected error has occurred. Your development organization has been notified.