docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface ITrustedClient

    The Trusted Client provides management for game apis using trusted authorization. Authorization relies on Service Account authentication.

    Namespace: Unity.Services.Apis
    Assembly: Unity.Services.Apis.dll
    Syntax
    public interface ITrustedClient

    Properties

    AccessToken

    The access token applied to apis.

    Declaration
    string AccessToken { get; }
    Property Value
    Type Description
    string

    CloudCode

    CloudCode Api

    Declaration
    ICloudCodeApi CloudCode { get; }
    Property Value
    Type Description
    ICloudCodeApi

    CloudSaveData

    CloudSave Player Data Api

    Declaration
    ICloudSaveDataApi CloudSaveData { get; }
    Property Value
    Type Description
    ICloudSaveDataApi

    CloudSaveFiles

    CloudSave Files Api

    Declaration
    ICloudSaveFilesApi CloudSaveFiles { get; }
    Property Value
    Type Description
    ICloudSaveFilesApi

    EconomyConfiguration

    EconomyConfiguration Api

    Declaration
    IEconomyConfigurationApi EconomyConfiguration { get; }
    Property Value
    Type Description
    IEconomyConfigurationApi

    EconomyCurrencies

    EconomyCurrencies Api

    Declaration
    IEconomyCurrenciesApi EconomyCurrencies { get; }
    Property Value
    Type Description
    IEconomyCurrenciesApi

    EconomyInventory

    EconomyInventory Api

    Declaration
    IEconomyInventoryApi EconomyInventory { get; }
    Property Value
    Type Description
    IEconomyInventoryApi

    EconomyPurchases

    EconomyPurchases Api

    Declaration
    IEconomyPurchasesApi EconomyPurchases { get; }
    Property Value
    Type Description
    IEconomyPurchasesApi

    Leaderboards

    Leaderboards Api

    Declaration
    ILeaderboardsApi Leaderboards { get; }
    Property Value
    Type Description
    ILeaderboardsApi

    Lobby

    Lobby Api

    Declaration
    ILobbyApi Lobby { get; }
    Property Value
    Type Description
    ILobbyApi

    MultiplayAllocations

    Multiplay Allocations Api

    Declaration
    IMultiplayAllocationsApi MultiplayAllocations { get; }
    Property Value
    Type Description
    IMultiplayAllocationsApi

    MultiplayFleets

    Multiplay Fleets Api

    Declaration
    IMultiplayFleetsApi MultiplayFleets { get; }
    Property Value
    Type Description
    IMultiplayFleetsApi

    PlayerAuthentication

    PlayerAuthentication Api

    Declaration
    IPlayerAuthenticationApi PlayerAuthentication { get; }
    Property Value
    Type Description
    IPlayerAuthenticationApi

    PlayerNames

    Player Names Api

    Declaration
    IPlayerNamesApi PlayerNames { get; }
    Property Value
    Type Description
    IPlayerNamesApi

    Methods

    ClearCredentials()

    Clears the credentials from the configuration of all apis

    Declaration
    void ClearCredentials()

    SetAccessToken(string)

    Apply the trusted access token to the apis

    Declaration
    void SetAccessToken(string accessToken)
    Parameters
    Type Name Description
    string accessToken

    The trusted access token

    SetServiceAccount(string, string)

    Set the service account that the apis will use.

    Declaration
    void SetServiceAccount(string apiKey, string apiSecret)
    Parameters
    Type Name Description
    string apiKey

    The service account key

    string apiSecret

    The service account secret

    SignInWithServiceAccount(string, string, List<string>, CancellationToken)

    Exchange service account credentials for an access token to use with game apis.

    • IMPORTANT * Always protect your service account credentials. Make sure service account information is never used in a game client.
    Declaration
    ApiOperation<ExchangeResponse> SignInWithServiceAccount(string projectId, string environmentId, List<string> scopes = null, CancellationToken token = default)
    Parameters
    Type Name Description
    string projectId

    The cloud project id

    string environmentId

    The environment id

    List<string> scopes

    The permission scopes

    CancellationToken token

    The optional cancellation token

    Returns
    Type Description
    ApiOperation<ExchangeResponse>

    The operation

    Events

    AccessTokenChanged

    Event raised when the access token changed.

    Declaration
    event Action AccessTokenChanged
    Event Type
    Type Description
    Action
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)