why I can not in glitch to call my host ip:8080 API service?
Glitch runs only on port 3000 and I believe that this restriction has got something to do with the issue…
Are you trying to call localhost:8080? In that case, it’s trying to call localhost:8080 inside of your project, which probably doesn’t have anything running on it.
function callGetSmsReminderResponseAPI(sender_psid, received_message) {
// Construct the message body
let reminderUrl = "http://1x.1x.185.8x:3000/response"
let request_query = {
app_id : '525951',
dest_addr: '18573056685',
message: received_message.text,
operator:'2',
source_addr : '415000000'
}
const url = reminderUrl + '?' + qs.stringify(request_query);
console.log("url : ", url)
// Send the HTTP request to the Messenger Platform
request({
uri: url,
method: 'GET',
headers: {'accept': '*/*'}
}, (err, res, body) => {
if (!err) {
console.log('message sent to sms reminder platform!')
} else {
console.error("Unable to send message:" + err);
}
});
I try call local start service with 3000 seems not works on glitch app,
What is the IP address under reminderUrl
? Is that another service?