twilio / twilio-php

A PHP library for communicating with the Twilio REST API and generating TwiML.

Home Page:https://www.twilio.com/docs/libraries/php

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Underscores in Url gets removed

thomas-dreyer opened this issue · comments

Underscores in Url gets removed when sending an sms

Steps to Reproduce

  1. Call the api with a message containing a url which contains an underscore '_' and send an sms
  2. The url will not contain any underscores resulting in a 404 error

Technical details:

  • twilio-php version: 3.63.3

Hello @thomas-dreyer,

Thank you for reporting this issue!

I tried unsuccessfully to reproduce the error with the following code:

<?php
require_once './vendor/autoload.php';

use Twilio\Rest\Client;

$sid = "..."; // Your Account SID from www.twilio.com/console
$token = "..."; // Your Auth Token from www.twilio.com/console

$client = new Twilio\Rest\Client($sid, $token);
$message = $client->messages->create(
    '...', // Text this number
    [
        'from' => '...', // From a valid Twilio number
        'body' => 'Hello from Twilio https://www.example.com/underscore_test_'
    ]
);

print $message->sid;

I receive the message: Hello from Twilio https://www.example.com/underscore_test_

Could you please provide us with a known non-working case so that I may reproduce? Thank you!

With best regards,

Elmer

Closing until question is addressed.