-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client Error Response while sending SMS #20
Comments
@manthan787 Are you still having this issue? We just released a new version of the library to support the newest version of guzzle. Hopefully that fixed this problem. |
@cachrisman Yes it's working perfectly now! |
Hi, i am not able to send an sms i get the following error: HTTP/1.1 400 BAD REQUEST I am using CURL. |
@dbelieves are you using the latest version of the plivo-php helper library? please share the code you use to send sms. |
@cachrisman, its resolved. |
I update composer and install new plivo as well as guzzle but, now I am getting error as, "Fatal error: Uncaught exception 'GuzzleHttp\Exception\RequestException' with message 'cURL error 60: SSL certificate problem: self signed certificate in certificate chain..." Before updating composer.json it works very well. So how to solve this problem? |
@Amarja can you post your composer.json and the code where you use a Plivo function which causes this error? |
@cachrisman thanks for your reply. My composer.json looks like, and my Plivo folder is in the root folder. I have used plivo functionality into simple php file. '141548XXXXX', 'dst' => '91XXXXXXXXXX', 'text' => 'Hi, I am Amarja :)', 'url' => 'http://localhost/untitled/sentsms.php', 'method' => 'POST' ); // Send message $response = $p->send_message($params); echo "Response : "; print_r ($response['response']); echo"error code is:".curl_easy_strerror(); echo "Api ID : {$response['response']['api_id']} "; echo "Message UUID : {$response['response']['message_uuid'][0]} "; ?> |
@Amarja you have to have a publicly available url set as the url parameter. That is telling Plivo to post the message details to that url but Plivo can't access your localhost. Try ngrok |
@cachrisman I tried after changing url, still having same issue....But before updating composer.json it works well and I'm getting this problems after updating the updating composer.json. Is there any other package that I am not updating? |
@Amarja can you make a fresh project (make a new directory and do a composer init and choose the plivo-php package and then do composer install) and copy in your php file and see if that works? |
@cachrisman Thanks so much for your reply, I will try this.. |
i got the following error when use the latest plivo.php. Parse error: syntax error, unexpected '[', expecting ')' in /home15/clientke/public_html/smst2/plivo.php on line 41 following is my test sending php file 'Company name', // Sender's phone number with country code 'dst' => '61490xxxx', // Receiver's phone number with country code 'text' => 'Hi, Message from Plivo', // Your SMS text message 'url' => 'https://glacial-harbor-8656.herokuapp.com/report', // The URL to which with the status of the message is sent 'method' => 'POST' // The method used to call the url //'text' => 'こんにちは、元気ですか?' # Your SMS Text Message - Japanese //'text' => 'Ce est texte généré aléatoirement' # Your SMS Text Message - French ); // Send message $response = $p->send_message($params); // Print the response echo "Response : "; print_r($response['response']); // Print the Api ID echo "Api ID : {$response['response']['api_id']} "; // Print the Message UUID echo "Message UUID : {$response['response']['message_uuid'][0]} "; ``` ?> |
I want to send a sms using custom from variable. For that I made it as 'src' => 'custom name', then I checked at plivo's account site here in the sms logs it shows me 'custom name' as source, but when actual sms was sent to the mobile then it shows 'VM-PLVSMS' as a source/from on the mobile. I want to change it to the custome one. Any idea how can I change it? Thanks in advance. |
@Amarja you will have to register the custom alpha-numeric sender id with the carrier. Please write to support@plivo.com with the details and we'll register it for you. |
@Ramya-Raghu thanks for your quick reply. I will go through it. |
Hi ,
Below is my php script `<?php
?>` my composer.json is
|
You should use |
Generally when we get OTP from any site then usually it is in the specific format. I am using plivo but I don't know how to insert that OTP with specific format. Here is my code, // Set message parameters Please give any suggestions, Thanks a lot in advance. |
@Amarja that code will work provided |
@cachrisman Thanks, now it's working properly :) |
Hi everyone! |
I get the following error while trying to make a POST request to send message:
When you look at the trace, there's an exception being thrown by Guzzle. But there's no way to know what may be wrong with the request being made by Plivo.
Any idea how to solve this?
The text was updated successfully, but these errors were encountered: