We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

SMS JSON Outbound - "error":"missing POST parameter \"to\""

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
cleone
Posts: 2
Joined: Tue Aug 23, 2016 7:42 pm

SMS JSON Outbound - "error":"missing POST parameter \"to\""

Post by cleone »

Hi,

We are new to Plum Dev and trying to get our SMS JSON outbound request to be accepted. My request is:

POST /ws/sms/queue.json HTTP/1.1
User-Agent: VOXAPM/3.0.0
Content-Type: text/html
Content-Length: 93
Host: hosting.plumgroup.com
Connection: Keep-Alive
Accept-Encoding: gzip,deflate
Authorization: Basic <auth hash>

{"to":"18565551212","from":"<10 digit plumdev number>","body":"Testing from VOX Telehealth.","result_url":""}


http://hosting.plumgroup.com/ws/sms/queue.json replies with:

HTTP/1.1 200 OK [Date: Tue, 23 Aug 2016 23:39:21 GMT, Server: Apache/1.3.41 (Unix) PHP/5.2.13 mod_ssl/2.8.31 OpenSSL/0.9.8e-fips-rhel5, X-Powered-By: PHP/5.2.13, Keep-Alive: timeout=2, max=100, Connection: Keep-Alive, Transfer-Encoding: chunked, Content-Type: text/plain

{"status":"failure","error":"missing POST parameter \"to\""}


Basic auth is successful. I have also tried changing the Content-Type to application/json and text/plain with no success. Also tried removing the result_url parameter. What am I doing wrong?

Thanks
Chris

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: SMS JSON Outbound - "error":"missing POST parameter \"to

Post by support »

Hi Chris,

I'm willing to bet the issue lies in the content-type of your request. It looks like you're submitting it as text/html (I see you tried JSON and plain text as well). I'd give it a try with the standard application/x-www-form-urlencoded and see if the api then recognizes your post parameters. I don't believe the api accepts JSON, so I believe that's what the issue is here. Hopefully that helps, but please let us know if you're still experiencing issues.

Regards,
Plum Support

cleone
Posts: 2
Joined: Tue Aug 23, 2016 7:42 pm

Re: SMS JSON Outbound - "error":"missing POST parameter \"to

Post by cleone »

Hi,

I just figured out the issue last night and will be closing this issue. The documentation provides zero examples of how the actual POST request should be formatted and since I am using Java, the PHP examples were not much help.

But as you suggest, the request cannot be formatted as JSON (even though the response is ??). So, I had to change the encoding to:

Content-Type: application/x-www-form-urlencoded

And the content (entity) must be formatted as urlencoded parameters:

sms_format=json&to=18565551212&from=<plum number>&body=Testing+from+VOX+Telehealth.&result_url=

Thanks for the reply and assistance.

Chris

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: SMS JSON Outbound - "error":"missing POST parameter \"to

Post by support »

Hi Chris,

We apologize for the confusion there. We have added the specification of Content-Type: application/x-www-form-urlencoded to each sms endpoint in the outbound sms documentation. Since we primarily use php internally, that's just what our samples ended up in, but we certainly understand it would be helpful to have additional language examples and we have taken that into consideration for when we update our documentation in the near future. Glad to hear everything is now working as expected though, please feel free to ask if you have any other questions.

Regards,
Plum Support

ajain
Posts: 3
Joined: Thu Aug 01, 2019 6:57 am

Re: SMS JSON Outbound - "error":"missing POST parameter \"to

Post by ajain »

POST /ws/sms/queue.json HTTP/1.1
User-Agent: VOXAPM/3.0.0
Content-Type: text/html
Content-Length: 93
Host: hosting.plumgroup.com
Connection: Keep-Alive
Accept-Encoding: gzip,deflate
Authorization: Basic <auth hash>

{"to":"18565551212","from":"<10 digit plumdev number>","body":"Testing from VOX Telehealth.","result_url":""}

http://hosting.plumgroup.com/ws/sms/queue.json replies with:

but i got error message, Invalid account.

usern me: ajain@imensosoftware.com
pwd: test@1234

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: SMS JSON Outbound - "error":"missing POST parameter \"to

Post by support »

Hi ajain,

In order to use our SMS tools, you do need to be a registered client with Plum Voice. We were unable to locate a company profile in our records with company imensosoftware nor anyone using your email.

Please reach out to our sales team if you are interested in our SMS tools.

Thank you!
Plum Support

Post Reply