기술 자료

​
​

Development

User Acquisition

Monetization

산업 분야

Multiplayer Services SDK

All Services

Multiplayer Services SDK

이 페이지는 선택한 언어로 제공되지 않습니다.
Multiplayer
​
​
Multiplayer Services SDK
  • Overview
  • Get started
  • Use multiplayer sessions
  • Manage sessions
  • Connect players through a relay
  • Networking
  • Matchmaking
    • Get started with matchmaking
      • Matchmaking ticket flow
      • Authentication
      • Matchmaking rate limits
      • Queues and pools
      • Matchmaker hosting providers
    • Manage and configure matchmaking
    • Matchmaker troubleshooting
    • Integrations with other UGS services
    • Deploy Matchmaker configurations
  • Monitor and debug sessions
  • Tutorials
  • Reference
  1. Multiplayer Services SDK

Authentication for matchmaker

Use authentication in Matchmaker to securely identify and authorize players.
읽는 시간 2분
최근 업데이트: 15일 전

There are two ways to authenticate in Matchmaker:
  • Player authentication
  • Service Account authentication

Player authentication

Player authentication uses Unity Authentication to enable player-driven matchmaking so that a game client can contact the Matchmaker service to create a ticket.
Make sure to initialize the Authentication service and sign in before making any calls using the Matchmaker SDK.
There are multiple ways to sign in. The simplest method is to use anonymous sign-in.

Multiplayer Services SDK implementation

In the Multiplayer Services SDK (
com.unity.services.multiplayer
), player authentication is a hard requirement, not an optional path.
MultiplayerInitializer
registers
IAccessToken
(from
Unity.Services.Authentication.Internal
) as a required dependency for the entire package, so the SDK can't initialize matchmaking without it.
Every client-facing matchmaking call
MatchmakeSessionAsync
,
CreateTicketAsync
,
GetTicketAsync
,
DeleteTicketAsync
, and
GetMatchmakingResultsAsync
internally calls a guard method (
EnsureSignedIn()
in
WrappedMatchmakerService
) that checks
IAccessToken.AccessToken
. If the player hasn't signed in through the Authentication service, the call throws:
MatchmakerServiceException(Unauthorized, "You are not signed in to the Authentication Service. Please sign in.")
In practice, this means calling
AuthenticationService.Instance.SignInAnonymouslyAsync()
(or another sign-in method) before any matchmaking call, as shown in the SDK's own examples.

Service Account authentication

Use Service Account authentication when a backend service creates a matchmaking ticket on behalf of a game client. This is useful when it's required to add server authoritative data to a matchmaking ticket, like a skill value, for example.
To create a Service Account, follow these instructions.
To use the Service Account in Matchmaker, follow those steps.
Here's an example of a typical service-to-service authentication flow:
  1. The client performs an anonymous authentication as described in Player authentication.
  2. The client calls a custom backend server with the
    PlayerId
    as the parameter.
  3. The custom backend calls the ticket creation route with the
    impersonate-user-id
    header set to the
    PlayerId
    value:
    curl --location --request POST 'https://matchmaker.services.api.unity.com/v2/tickets' \--header 'Content-Type: application/json' \--header 'Authorization: {{SERVICE-ACCOUNT-TOKEN}}' \--header 'impersonated-user-id: {{PLAYER-ID}}' \--data-raw '{ "players": [ { "id": "{{PLAYER-ID}}","customData": { "Skill": {{ENRICHED-DATA}} } } ] }'
  4. The custom backend sends the ticket ID back to the client.
  5. The client polls the ticket status using the client SDK.

Additional resources

  • ISession interface
  • MatchmakerOptions

Copyright © 2026 Unity Technologies
법률 정보개인정보 처리방침쿠키Documentation Terms of Use개인 정보 판매 또는 공유 금지개인정보 보호 선택(쿠키 설정)

'Unity', Unity 로고 및 기타 Unity 상표는 미국 및 기타 지역 내 Unity Technologies 또는 그 계열사의 상표 또는 등록상표입니다(자세한 내용은 여기에서 확인하세요). 기타 명칭 또는 브랜드는 해당 소유자의 상표입니다.

일부 페이지는 편의를 위해 기계 번역되었으며 부정확한 내용이 있을 수 있습니다. 정보가 상충되는 경우, 영어 버전을 우선으로 참조하세요.

  • 보고 있는 페이지
    • Player authentication

      • Multiplayer Services SDK implementation

    • Service Account authentication

    • Additional resources


이 페이지의 문제 보고