New SMS Gateway

389 views
Skip to first unread message

Dennis Van Brusselen

unread,
Jun 12, 2015, 5:08:24 PM6/12/15
to newfies...@googlegroups.com
Hi!

For the last couple of days i'm trying to configure a new SMS gateway with a DINSTAR DWG2000D.

Dinstar has a nice and understandable API. HTTP for transport, JSON for the data..

Some examples; 


text= content
port= sim card port for sending
param array= user_id , number, 

The only problem i'm facing for the moment is that there is an http digest authentication configured on the Dinstar gateway, i don't have the possibility to send username and password over the API interface.


GET /api/send_sms?text=%23param%23&number=***********&param=text_param&param=user_id&param=number&user=********&text_param=************&password=**********&port=0&port=1&port=2&port=3&port=4&port=5&port=6&port=7&port=8&port=9&port=10&port=11 HTTP/1.1

HTTP/1.1 401 Unauthorized

Is there a possibility to send the credentials first to the Dinstar ?

When i launch this CURL script it works perfectly.

curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d '{"user-id":"13","text":"#param#","port":[0,1,2,3,4,5,6,7,8,9,10,11],"param":[{"number":"*********","text_param":["******TEST"],"user_id":100}]}' -u USER:PASSWORD http://192.168.X.X/api/send_sms/


Thanks in advance!



Dennis Van Brusselen

unread,
Jun 12, 2015, 5:19:48 PM6/12/15
to newfies...@googlegroups.com
Can someone share me how to adapt the code to add Username and password before sending GET command to DINSTAR?

Op vrijdag 12 juni 2015 23:08:24 UTC+2 schreef Dennis Van Brusselen:

Areski

unread,
Jun 14, 2015, 3:02:56 PM6/14/15
to newfies...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Newfies-Dialer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to newfies-diale...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Kind regards,
/Areski

----
Arezqui Belaid, <are...@gmail.com>
Founder at Star2Billing (www.star2billing.com)

Tel: +34650784355
Twitter: http://twitter.com/areskib
LinkedIn: http://www.linkedin.com/in/areski
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages