Device serial number (or other stable, game-specific identifier)

I would like to request a way to get the current device's serial number or a similarly derived unique identifier.

My end-goal is for my game to use or hash this identifier locally to generate a QR code for the user to scan on a smartphone. Then the user would pay for an "unlock code" and then I'd verify the serial number offline on the Playdate device. Heiko's post here reminded me of KiezelPay which has a similar unlock mechanism but uses the paired device's network capability to verify over Wi-Fi.

Playdate has an unofficial/private Wi-Fi API and my goal is not to suggest that Panic make this an officially supported API for developers. (While, yes, it would be cool, from what I've seen it's definitely a larger ask.)

2 Likes

This would be great for highscore tracking too. (provide the score with the UDID or unique code via QR code to track scores etc.)

Agreed, if I could get a stable user identifier then a user could unlock a purchase for all the Playdate consoles in their account!

I'd like to offer some kind of receipt validation tool for this in the future, but yeah, this would be a small step in that direction that we could ship a lot faster. I'm a little wary of games accessing the serial number directly, just for paranoia's sake.. And is it a potential problem for two games to see the same identifier? Since we don't have unique identifiers for the games themselves that's probably moot.

Yeah, I like the idea of a user id instead, so that the purchase isn't tied to a single device. I'm not very familiar with the OTA update code.. We might already be storing a user id on the device for that. :thinking:

2 Likes

For sure, I also don't think game developers should have direct access to the device's serial number. I think some kind of salted one-way hash of the logged in player's account ID should be enough? For example, I see on my Mac that the Playdate Simulator has a file at /System/Data/cachedAccountInfo.json with that value as a UUID, separate from the user's username (for me that's a numeric string but I've seen some people with custom usernames).

1 Like

Any update on this? Would really love to be able to have access to a stable User ID in my game as well

Nothing to report yet, sorry.