Start UWS Explorer and Log In

NOTE: You may need to enable support for newer TLS versions in your Windows computer in order to connect with the M2M data center. See this article at Microsoft for more information:

https://support.microsoft.com/en-us/help/3154518/support-for-tls-system-default-versions-included-in-the-.net-framework-3.5.1-on-windows-7-sp1-and-server-2008-r2-sp1

  1. Run \Tools and Examples\bin\Uws Explorer\UwsExplorer.exe.

    The UWS Explorer window appears:

Logging in Through UWS Explorer

The UWS Explorer uses the same APIs as your application to communicate with the ThingSpace Platform. They both must use the Login API to authenticate with the ThingSpace Platform and receive a session token before making any other requests.

This example shows how to log in with the UWS Explorer tool. (The source code for the Explorer is in the Wireless Network Services SDK, and demonstrates one way to utilize Wireless Network Services.) The UWS Explorer does not display the password field in the request for security reasons; however, your application must include the password field when it sends a LogIn request to the ThingSpace Platform.

  1. Enter your username and password in the fields in the upper panel. You should also enter the name of the account that contains the devices that you want to work with. (The account name is not a LogIn parameter, but UWS Explorer uses it for other API requests.)

  2. Click Login.
  3. Review the XML in the Request and Response panes. Note the session token in the response.

Using the Session Token

The response includes a session token that your application must include as the SessionToken value in the header of all API session requests following LogIn. (UWS Explorer does that for you automatically, but you must code it into your application.) Here is a sample SOAP header showing the session token in bold.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://nphase.com/unifiedwebservice/v2"
  ... 
  <soapenv:Header>
    <v2:token >0981e063-b2b0-4b47-bb28-7dea88a76fb4</token>
  </soapenv:Header>

Session tokens expire after 20 minutes with no activity. If a token expires, your application must authenticate again to obtain a new token. An API request that includes an expired token will receive a fault stating that "The session has expired."