How to get IMEI or any device id in a variable?

Is there any way to set value of IMEI or any unique system information related value like device id into a variable?

1 Like

Hi @Mohit_Chandak there is no way to get the IMEI at the moment. You could utilize the “Get device token (beta)” flow function, it returns an APNS push token for iOS and Firebase Cloud Messaging token for Android, which is device specific.

is it unique for every device? will it stay the same if user uninstalls app and reinstalls?
I will be using it for first time registration of user. Will create a logic flow where a rest API will check whether this ID is registered, if registered, do not show the registration flow and directly move to next page.

Do you recommend anything else for this?

Hi, yes it’s unique, since it’s used for sending push notifications to the device. I’m not 100% certain that the token will never change though. You can account for the change by using the “Set item to storage” and “Get item from storage” flow functions. Set the token to storage when the user first registers. Then on Global Canvas App launched event, compare the token in storage to the one retrieved by the flow, and save the new one if it has changed.

The only scenario where this wouldn’t work is when the user has uninstalled the app, the token changes, and they re-install the app.

1 Like