# Google play services get user ID after Show External Login UI

**URL:** <https://forums.unrealengine.com/t/google-play-services-get-user-id-after-show-external-login-ui/659922>\
**Category:** Mobile\
**Tags:** unreal-engine, UE5-0, Android\
**Created:** [September 30, 2022, 6:08pm UTC](https://forums.unrealengine.com/t/google-play-services-get-user-id-after-show-external-login-ui/659922 "2022-09-30T18:08:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BearWithMe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BearWithMe](https://forums.unrealengine.com/u/BearWithMe)\
**Post date:** [September 30, 2022, 6:08pm UTC](https://forums.unrealengine.com/t/google-play-services-get-user-id-after-show-external-login-ui/659922/1 "2022-09-30T18:08:53Z")

</div>

We are making a mobile game for Android.

Users will be shown External Login UI to log into Google play services. We want to access the user information and in Firebase Firestore we want to create record with some data from savegame so the user can restore their progress in the game.

Is there any blueprint solution to access this data? Unreal has to access it in order to show leaderboards and achievements but why does it not have out of box feature for me to access it?

---

<div class="post-metadata">

**Author:** ![BearWithMe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BearWithMe](https://forums.unrealengine.com/u/BearWithMe)\
**Post date:** [October 12, 2022, 10:09pm UTC](https://forums.unrealengine.com/t/google-play-services-get-user-id-after-show-external-login-ui/659922/2 "2022-10-12T22:09:55Z")

</div>

We have moved on and are successfully logged in with the Google Play account. Leaderboards/Achievements work.

I am currently trying C++ to get Google Play Services user id. But even thought we are logged in we get empty string from the code below. Any ideas?

> FString UUGooglePlayServicesUser::GetGooglePlayUserUID(int32 PlayerControllerNum) {
> 
> IOnlineSubsystem\* OnlineSubsystem = IOnlineSubsystem::Get(“GooglePlay”);
> 
> FString UserUID = “”;  
> if (OnlineSubsystem) {  
> IOnlineIdentityPtr Identity = OnlineSubsystem-\>GetIdentityInterface();  
> if (Identity.IsValid()) {  
> TSharedPtr ID = Identity-\>GetUniquePlayerId(PlayerControllerNum);  
> if (ID.IsValid()) {  
> UserUID = ID-\>ToString();  
> }  
> }  
> }  
> return UserUID;  
> }
