How can we normally obtain the device's did , and should we save it?

How can we normally obtain the device's did , and should we save it?
If you require secondary development, it is recommended to save the did. You can obtain the current user's device information through the API.