socket.io sending hyperlink text - hyperlink

I have a basic socket.io realtime chat application. The client side when receiving a message:
socket.emit('chat message', $('#m').val());
When I send a URL in the message, it isn't hyperlinked. Does anyone know how to get the URL portion of the message hyperlinked?
Any help is appreciated!
Thanks!
KW

Related

Graph API for Outlook message restore

I had taken backup of my mail box using below rest API
GET https://graph.microsoft.com/v1.0/me/messages
But from My side this email msg deleted and i want to restore it again .
How i can do it using Rest API.
I tried with
POST https://graph.microsoft.com/v1.0/me/messages
and body with message.
but the message added as a draft not actual message.
Please help.
That is correct, when you create an email it will always save as draft unless it has been sent.
Try find the returned message id from the message creation POST, then issue a secondary POST to send it:
POST https://graph.microsoft.com/v1.0/me/messages/{id}/send
Ref: message: send

Json file with Authorization for POST

Im currently trying to send a message from Teams to a bot.
If I'm sending the message via Postman the bot receives the message.
When I'm trying to send a message from Teams the bot does not receive the message.
I assume that I have made an mistake in my json where my Authorization is. Can anyone tell me if my header is correct or where my mistake is?

How to delete message logs in twilio trial account?

I am using twilio trial account for sending message and it generate SMS logs.
I want to remove all SMS logs from my trial account of twilio.
please help me.
You can use the PHP helper library to redact the body of a message, or delete the entire message resource:
$client = new Services_Twilio('AC123', '123');
$message = $client->account->messages->get("MM123");
$message->redact(); // Erases 'Body' field contents
$message->delete(); // Deletes entire message record
More info on deleting message can be found in our docs.
Hope that helps.

Is there a way to see the response to Twilio's request to the SMS URL?

When I set my SMS Url for a given phone number and then send a text to that phone number, the request somehow fails. Is there a way for me to inspect the error response (404/500/403 etc) to see any exception details from my twilio dashboard?
Hi Twilio Customer Support here,
Have you viewed the app monitor?
https://www.twilio.com/user/account/developer-tools/app-monitor
It contains all of the errors that your account has recorded, you can drill down on each error to see the request body etc.

Twilio is sending the Message Fall Back URL text along with actual text

Initially I have been using the TwiML response to send response to my text messages. But since my requirement has changed and I need to send more than 10 messages in response to my text hence I am now using the Twilio API to send the message out. So to fix this now I am trying to send nothing as the TwiML response for my Text Messages and instead using the Twilio API to send the actual messages out. I also have a TwiML bin URL attached to my short code as a Message Fall Back URL in case Twilio is not able to connect to my REST API URL. So now when a Text message is received by Twilio it connects to my REST API and the response is sent. But I am getting the response from the Message FallBack URL first and then the actual response for my text message via the Twilio API. Is there anyway to avoid this? I can remove the Message Fall back URL but then what would happen in the actual case when Twilio is not able to connect to my server?
This is how I have added the code:
var twilioResponse = new Twilio.TwiML.TwilioResponse();
...... have code that uses Twilio API to send out more than 10 messages.
...... Since the messages are going out via Twilio API hence returning NULL to the TwiML response
return Request.CreateResponse(HttpStatusCode.OK, twilioResponse.Element);
More Updates:
As I mentioned earlier I'm using the REST API to send an SMS. When a Text request comes Twilio server calls my URL supplied to the REST call.
Sometimes my server is little slow in responding - in which case twilio gets the fallback URL message and passes on the text message.
How do I increase the timeout ? This timeout is the time the server responding with TWIML.
Please help - any pointers are appreciated.
Twilio evangelist here.
My first suggestion would be to check your accounts App Monitor to see if Twilio is logging any errors. The Fallback URL should not be getting requested unless Twilio fails to get a valid response from the primary URL.
The default timeout for a Twilio request is 15 seconds, so if your server is taking longer than that to respond there may be a bigger issue happening with your server or network.
Hope that helps.

Resources