Generate a unique user ID with the REST API

The REST API offers the following method for generating a random unique user ID:

https://collect.analytics.unity3d.com/api/analytics/collect/v1/uuid

For more information, refer to the API documentation.

A user ID is an ID that's unique to a user. If you're using Unity Gaming Services or another solution that generates a user ID at the start of the user's lifecycle, use that ID to send to the Analytics REST API. If you don’t have your own user ID in your game, it's recommended that you create a Universally Unique Identifier (UUID). You need to store the returned value locally on the client and reuse it for all future calls to the Collect endpoint from that specific client.

WARNING: Don't change what you're using.

When you have an ID, the user is identified by this value. However, there might be legal restrictions or limitations from licensing restrictions that prevent storing the apparent user ID at third-party locations. A workaround is to create a hash of this ID and use it as a user ID for the integration; this prevents storing the user ID again.