Skip to main content
Signs the user in using the Android device identifier, returning a session identifier that can subsequently be used for API calls which require an authenticated user

Syntax

Parameters

serviceConfigHandle   PFServiceConfigHandle PFServiceConfigHandle returned from PFServiceConfigCreateHandle call. secretKey   char*
In_z
Title Secret Key used to authenticate the service request. request   PFAuthenticationServerLoginWithAndroidDeviceIDRequest* Populated request object. async   XAsyncBlock*
Inout
XAsyncBlock for the async operation.

Return value

Type: HRESULT Result code for this API operation.

Remarks

This API is available on Windows. On Android devices, the recommendation is to use the Settings.Secure.ANDROID_ID as the AndroidDeviceId, as described in this blog post (http://android-developers.blogspot.com/2011/03/identifying-app-installations.html). More information on this identifier can be found in the Android documentation (http://developer.android.com/reference/android/provider/Settings.Secure.html). If this is the first time a user has signed in with the Android device and CreateAccount is set to true, a new PlayFab account will be created and linked to the Android device ID. In this case, no email or username will be associated with the PlayFab account. Otherwise, if no PlayFab account is linked to the Android device, an error indicating this will be returned, so that the title can guide the user through creation of a PlayFab account. Please note that while multiple devices of this type can be linked to a single user account, only the one most recently used to login (or most recently linked) will be reflected in the user’s account information. We will be updating to show all linked devices in a future release. When the asynchronous task is complete, call PFAuthenticationServerLoginWithAndroidDeviceIDGetResult to get the result.

Requirements

Header: PFAuthentication.h

See also

PFAuthentication members
Last modified on September 11, 2026