Authorize admin to pass provision commands

Authorize admin to pass provision commands SearchSearch
Author Message
Neeraj Kalyan
New member
Username: Nk1967in

Post Number: 7
Registered: 06-2006
Posted on Sunday, August 08, 2010 - 02:34 pm:   

Dear Sir
Please give me complete list of http url parameters using which i can give provisioning commands.

How to authorize admin using HTTP URL?

-Neeraj
Neeraj Kalyan
New member
Username: Nk1967in

Post Number: 8
Registered: 06-2006
Posted on Monday, August 09, 2010 - 08:05 am:   

Also
I tried
---------------------------------------
sendString = "type=sms&userName=neeraj&adminAction=creditCheck"
URLToSend = "http://IP:PORT/provision?" & SendString
dim objXmlHTTP
Set objXmlhttp = Server.CreateObject("msxml2.ServerXMLHTTP")
objXmlHTTP.open "GET", URLToSend, false
objXmlHTTP.setRequestHeader "Authorization", "neerajadmin:neeraj123"
' where neerajadmin is adminlogin
' and neeraj123 is adminPassword

objXmlHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objXmlhttp.send(NULL)
ResponseFromServer=objXmlHttp.responseText

response.Write "<br><br>response from server===>" & ResponseFromServer
------------------------------------
But responsefromserver is blank
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2402
Registered: 08-2008
Posted on Monday, August 09, 2010 - 03:19 pm:   

Hi,

The user account provisioning parameters can be found here:

http://www.nowsms.com/support/bulletins/tb-nowsms-013.htm

Regarding your script, I see a few problems.

First, even if the server rejects the request, you should get some sort of response. Have you put in the address of your NowSMS server in place of "IP:PORT" in the URL?

Second, In the "sendString", "userName=" should be "Name=".

Third, the Authorization header credentials need to be Base64 encoded. I found some resources that explain how to do this with the following search: http://www.google.com/search?q=setrequestheader+authorization

Instead of using Base64 encoding, you can include the admin authorization credentials in the URL string by adding the following "&User=neerajadmin&Password=neeraj123".

--
Des
NowSMS Support