#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. |
| -EINVAL | The id_buf parameter is NULL and/or the id_buf_sz parameter is 0. |
| -EMSGSIZE | The provided buffer is too small. |
| -EIO | The client ID could not be initialized. |
| -ENXIO | The 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.