ThingWorx WebSocket-based Edge MicroServer (WS EMS) and Lua Script Resource (LSR) > Creating an Application Key for WS EMS
Creating an Application Key for WS EMS
When connecting to a ThingWorx platform, the WS EMS needs to present an Application Key for authentication. This Application Key needs to be associated with a non-admin user. The sections below explain how to create the non-admin user for a WS EMS and how to configure the Application Key.
To be able to create a non-admin user or an Application Key, you must log in as an Administrator of ThingWorx platform or as a member of a user group that has permissions and visibility to these security entities.
Creating a Non-Admin User in ThingWorx Composer
Follow these steps to create a non-admin user for the WS EMS Application Key:
1. Log in to ThingWorx Composer.
2. In the left navigation panel, select Browse and scroll down to Security.
3. Select Users to display the list of users currently configured in the platform.
4. In the bar just above the list, click +New.
5. In the General Information page, type a name for the WS EMS user account. For example, wsemsUser. You will associate this user with an Application Key for the WS EMS, so do not enter a password.
6. If desired, enter a Description for this user.
7. Check to make sure that the Enabled check box is selected, and click Save.
Follow these steps to configure an Application Key and a Thing for the WS EMS asset in ThingWorx Composer:
1. From Security > Application Keys > , click > New.
2. Enter the appropriate values:
a. Name — A name for the Application Key. For example, wsemsappkey23
b. User Name Reference — The name of a user account to associate with the Application Key. You can select from a list by clicking the plus icon in this field. A list from which you can select a user for the key appears:
In the example above, the wsems_user is selected. The permissions and visibility assigned to this user account affect what the WS EMS can do on the platform. For example, write new values to remote properties.
c. Expiration Date — A date in the future for the Application Key to expire, based on your company policies. The default value is one day. Use the calendar widget to select a date and the time widget to select a time.
3. Click Save.
4. Create a Thing in ThingWorx for the asset that is running the WS EMS. Depending on the features you want to use, choose one of the following Thing Templates or a Thing Template that implements any of the following Thing Templates:
RemoteThingWithTunnelsAndFileTransfer — Use for assets for which you want file transfers, SCM, and remote access capabilities.
RemoteThingWithFileTransfer — Use for assets for which you want file transfers (upload and download) and/or SCM capabilities, but not remote access capabilities.
RemoteThingWithTunnels — Use for assets for which you want to use remote access capabilities but not file transfers or SCM.
5. Follow the instructions for configuring your WS EMS with an Application Key in Configuring the WS EMS.