Skip to main content
Version: 5.17.0

ChangeToFederation

public BackendReturnObject ChangeToFederation(string federationToken, FederationType type);

Parameters

ValueTypeDescription
federationTokenstringFederation token
typeFederationType(enum)Federation type.
FederationType.Google
FederationType.Facebook
FederationType.Apple
FederationType.Steam
FederationType.GPGS2

Description

This feature allows an account logged in with either a custom or federation account to be switched to a different federation account.\ When a user is logged in and calls the ChangeToFederation method, the current account is converted to another federation account while retaining the existing account data.\ After switching, the user can log in with the newly linked federation account and continue using their existing game data.\ If the user logs in again with their previous custom or federation account, a new account will be created.\ For more information on federationToken and type required for the ChangeToFederation method, please refer to the Federation authentication documentation.

Example

Synchronous

Backend.MultiCharacter.Account.ChangeToFederation("federationToken" , FederationType.Google);

Asynchronous

Backend.MultiCharacter.Account.ChangeToFederation("federationToken" , FederationType.Google, callback =>
{
// Process after federation authentication
});

SendQueue

SendQueue.Enqueue(Backend.MultiCharacter.Account.ChangeToFederation, "federationToken" , FederationType.Google, callback =>
{
// Process after federation authentication
});

ReturnCase

Success cases

When the switching is successful\ statusCode : 200\ message : Success