EOS API reference page for EOS_Connect_CreateDeviceId

This function is part of the Connect Interface.


Create a new unique pseudo-account that can be used to identify the current user profile on the local device. This function is intended to be used by mobile games and PC games that wish to allow a new user to start playing without requiring to login to the game using any user identity. In addition to this, the Device ID feature is used to automatically login the local user also when they have linked at least one external user account(s) with the local Device ID. It is possible to link many devices with the same user's account keyring using the Device ID feature. Linking a device later or immediately with a real user account will ensure that the player will not lose their progress if they switch devices or lose the device at some point, as they will be always able to login with one of their linked real accounts and also link another new device with the user account associations keychain. Otherwise, without having at least one permanent user account linked to the Device ID, the player would lose all of their game data and progression permanently should something happen to their device or the local user profile on the device. After a successful one-time CreateDeviceId operation, the game can login the local user automatically on subsequent game starts with EOS_Connect_Login using the EOS_ECT_DEVICEID_ACCESS_TOKEN credentials type. If a Device ID already exists for the local user on the device then EOS_DuplicateNotAllowed error result is returned and the caller should proceed to calling EOS_Connect_Login directly.


Parameter Type And Name

Usage Information

EOS_HConnect Handle

const EOS_Connect_CreateDeviceIdOptions* Options

structure containing operation input parameters.

void* ClientData

arbitrary data that is passed back to you in the CompletionDelegate.

const EOS_Connect_OnCreateDeviceIdCallback CompletionDelegate

a callback that is fired when the create operation completes, either successfully or in error.

This function is asynchronous; the EOS SDK guarantees that your callback (the CompletionDelegate parameter) will run when the operation completes, regardless of whether it succeeds or fails. Use the void* parameter to pass any contextual information the callback may need in order to react properly. Relevant information can be copied from the EOS SDK's cache while the callback function is running. You do not need to remove the callback function.

Callback Function Information

Because this function is asynchronous, it employs a callback of type EOS_Connect_OnCreateDeviceIdCallback to report the results of its operation.

Callback Parameters

Parameter Type And Name

Usage Information

const EOS_Connect_CreateDeviceIdCallbackInfo* Data

Output parameters for the EOS_Connect_CreateDeviceId function.

Related API Members