Reading user info from Intranet

Home Forums FaxFinder Reading user info from Intranet

Tagged: ,

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #4954
    David Kadish
    Participant

    Hi
    Is there a way that I can get users’ names and their fax numbers through my internet?
    Thanks,

    #4955
    Mike Gadda
    Blocked

    Import 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?

    #4956
    David Kadish
    Participant

    Hi
    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,

    #4957
    Mike Gadda
    Blocked

    The 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

    #4965
    David Kadish
    Participant

    Hi
    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,

    #4966
    Mike Gadda
    Blocked

    We have some coding examples for certain languages here:

    https://webfiles.multitech.com/engineering/sample-code/fax-finder/

    #4970
    David Kadish
    Participant

    Hi Mike
    The following is the code I am using.
    ————————————————-
    Private Sub getUserInfo()
    Dim response As WebResponse

    ServicePointManager.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.Length

    Dim 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,

    #5008
    David Kadish
    Participant

    Hi 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

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘FaxFinder’ is closed to new topics and replies.