#include <include/net/nrf_cloud.h>
Retrieve the current device ID.
- Parameters
-
[in,out] | id_buf | Buffer to receive the device ID as a null-terminated string. |
[in] | id_buf_sz | Size of buffer, maximum size is NRF_CLOUD_CLIENT_ID_MAX_LEN + 1. |
- Return values
-
0 | If successful. |
-EMSGSIZE | The provided buffer is too small. |
-EIO | The client ID could not be initialized. |
-ENXIO | The Kconfig option embed:rst:inline :kconfig:option:`CONFIG_NRF_CLOUD_CLIENT_ID_SRC_RUNTIME` is enabled but the runtime client ID has not been set. See nrf_cloud_client_id_runtime_set. |
- Returns
- A negative value indicates an error.