Reading user info from Intranet
- This topic has 7 replies, 2 voices, and was last updated 10 years, 2 months ago by David Kadish.
-
AuthorPosts
-
February 3, 2014 at 3:00 pm #4954David KadishParticipant
Hi
Is there a way that I can get users’ names and their fax numbers through my internet?
Thanks,February 3, 2014 at 3:06 pm #4955Mike GaddaBlockedImport methods will vary depending on the model of Faxfinder. Which model are you referring to? It will start with FF.. Are you trying to sync to Outlook contacts or are you trying to import users into the Faxfinder?
February 3, 2014 at 3:16 pm #4956David KadishParticipantHi
Thank you for the reply.
We have FaxFinder® FF240 system.
I am an Intranet developer. In my intranet database I keep all the users, their phones and fax numbers. To get the fax numbers from FaxFinder, I login to Faxfinder app, click on Users and export the file to the folder. After that I read the file from the Internet and update the database. I have to do this every time there is new employee or somebody stops working here. I would like to automate the process and be able to read the data from the Intarnet directly. Is it possible?
Thanks,February 3, 2014 at 4:11 pm #4957Mike GaddaBlockedThe web API can be used to retrieve user info, however the username would have to be known. Contact info can be retrieved/modified also and that doesn’t require the names. You’re just wanting the users from what it sounds like. Here is a link to the Web API guide:
http://www.multitech.com/en_US/DOCUMENTS/Collateral/manuals/S000527A.pdf
February 6, 2014 at 1:50 pm #4965David KadishParticipantHi
I checked in the manual and it seems like I need to use Retrieving User Information function. I don’t understand the example. Can you please tell me how I can use the function with my ASP.NET code?Thanks,
February 6, 2014 at 2:24 pm #4966Mike GaddaBlockedWe have some coding examples for certain languages here:
https://webfiles.multitech.com/engineering/sample-code/fax-finder/
February 10, 2014 at 10:33 am #4970David KadishParticipantHi Mike
The following is the code I am using.
————————————————-
Private Sub getUserInfo()
Dim response As WebResponseServicePointManager.Expect100Continue = False
Dim request As WebRequest = WebRequest.Create(“https://11.22.33.44/ffws/v1/ofax/”)
request.Credentials = New NetworkCredential(LoginUsername, LoginPassword)
request.Method = “POST”Dim postData As String = “GET https://11.22.33.44/ffws/v1/users/USERNAME HTTP/1.1”
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)request.ContentType = “application/xml”
request.ContentLength = byteArray.LengthDim dataStream As Stream = request.GetRequestStream()
‘ Write the data to the request stream.
dataStream.Write(byteArray, 0, byteArray.Length)
‘ Close the Stream object.
dataStream.Close()
‘ Get the response.
response = request.GetResponse()
Exit Sub
End Sub
———————————————————-
When I hold Ctrl key and click on https://11.22.33.44/ffws/v1/users/USERNAME I do get the right data, but no metter I try, I always get error on request.GetResponse() – “The remote server returned an error: (400) Bad Request.”
Thanks,February 10, 2014 at 3:33 pm #5008David KadishParticipantHi Mike
Finally I figured it out.
In case somebody else needs it, here is the code (ASP.NET,VB)
———————-
Dim request As WebRequest
Dim responseData As String = “”
Dim str As String = “”Dim request As WebRequest = WebRequest.Create(“https://11.22.33.44/ffws/v1/users/USERNAME”)
request = WebRequest.Create(str)
request.Credentials = New NetworkCredential(NAME, PASSWORD)
request.Method = “GET”Try
Dim response As WebResponse = Request.GetResponse()
Dim strOK As String = CType(Response, HttpWebResponse).StatusDescription
If strOK = “OK” Then
responseData = WebResponseGet(request) ‘responseData
UserFaxNumber = FaxNumber(responseData)
response.Close()
End If
Catch ex As Exception
End Try -
AuthorPosts
- The forum ‘FaxFinder’ is closed to new topics and replies.