# Authentication Token

Sign up at https://www.socketxp.com/login (opens new window) and get your authentication token.


Use the authentication token to authenticate the SocketXP agent with the SocketXP Cloud Service, as shown below.

$ socketxp login "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NDk1MTg0MDAsImlkIjoiZ2FuZXNodmVscmF..."

If you prefer to name your device using a unique identifier, you could use additional arguments to the login command as shown below.

$ socketxp login <your-auth-token-goes-here>  --iot-device-name "sensor12345" --iot-device-group "temp-sensor"


You cannot change the device name and device group from the CLI, after you have registered the device once using the login command. If you want to update the device name or group later, you can do so only from the SocketXP Portal Device page by editing the device listed in the table.

Alternatively, you could delete the device from the portal, remove the /var/lib/socketxp directory in your device and redo the socketxp login command with the new device name and group.

The login command will download a unique device.key from the SocketXP Cloud Gateway and store it in the /var/lib/socketxp folder. The authtoken is used to authenticate with the gateway, add the device to your account, and download a unique device key generated by the gateway for the device. The authtoken will not be stored in the device. The device key will be used for all future authentication purposes.