nabto_device_add_server_connect_token()

DESCRIPTION

Add a Server Connect Token (SCT) to the server (basestation) which the device uses.

DECLARATION

NABTO_DEVICE_DECL_PREFIX NabtoDeviceError NABTO_DEVICE_API
nabto_device_add_server_connect_token(NabtoDevice* device, const char* serverConnectToken)

PARAMETERS

device:
[in] The device instance
serverConnectToken:
[in] The utf8 encoded token which is added to the basestation.

RETURNS

  • NABTO_DEVICE_EC_OK: if the token is added.
  • NABTO_DEVICE_EC_OUT_OF_MEMORY: if the token cannot be stored in the device.