Summary:
This article provides a solution for developers needing to find a Unity Cloud Player ID using an external ID for data deletion requests. The issue arises can arise when developers receive support requests but only have the ID of the player from an external auth provider, like Google, Apple, Facebook etc...
The solution involves using the Player Authentication Admin API to retrieve the Unity Player ID by filtering based on the external ID, and then using various APIs to delete the player's data from Leaderboards, Cloud Save, and Analytics services.
A common support ask is facilitating Data Deletion requests, which this article covers.
Finding Unity Cloud Player ID Using external oAuth IDs
Symptoms:
- Received support request from a player.
- Only have the player's external ID.
- Player has previously linked their player account with a single sign on provider
Cause:
The issue stems from the need to identify a player's Unity Player ID using an external ID to fulfill support requests
Resolution:
1. Use the Player Authentication Admin API to list matching players and filter based on the user's external ID. This example uses Facebook:
https://services.api.unity.com/player-identity/v1/projects/{{projectId}}/users?limit=10&idProvider=facebook.com&externalId={{FacebookID}}
2. Once the Unity Player ID is identified, delete the player's data from:
- Leaderboards: the Leaderboards Admin API to delete player scores.
https://services.docs.unity.com/leaderboards-admin/#tag/Leaderboards/operation/deleteLeaderboardPlayerScoreAllLiveLeaderboards
- Cloud Save: Using the Cloud Save Admin API Delete Player Items, Public Player Items, Protected Player Items, and Private Player Items.
https://services.docs.unity.com/cloud-save-admin/v1/index.html#section/Introduction
- Analytics: Find relevant Analytics UserIDs and submit a deletion event.
https://docs.unity.com/en-us/analytics/rest-api/request-data-deletion-rest-api
3. Implement an in-app data deletion request feature to automate this process using Cloud Code and the Analytics SDK's RequestDataDeletion() method.
If you're encountering difficulties with these, reach out to Gaming Services Support for assistance