文档

​
​

Development

User Acquisition

Monetization

工业

Unity Services Web APIs

Open Unity Dashboard

Unity Services Web APIs

此页面不支持所选语言。
​
​
Unity Services Web APIs
  • Overview
  • Get started
Web API guides
  • Authentication
  • API lifecycle
  • Response status and error codes
  • Response headers
  • Unity Version Control CM API
  • Unity Version Control server API
    • Overview
    • How to use the API
Admin Settings
  • Access
  • Unity Releases
Analytics
  • Analytics
Identity and Access Management
  • Application and Deep Linking
Monetization
  • Monetize
Viewers and Collaboration
  • Annotations
  • Presence
Access
  • Access
Assets
  • Assets
Auth
  • Auth
Collaboration
  • Collaboration
Content Management
  • DataStreaming
  • Storage
  • Workflow Engine
DevOps
  • Automation
  • Build Automation
  • Unity Version Control
Growth
  • Ads Unified Platform
  • User Acquisition
Identity
  • SCIM
In-App Purchases
  • Webshop
Live Operations
  • Game Backend
  • Observability Logs
Multiplayer
  • Distributed Authority
  • Friends
  • Lobby
  • Matchmaker
  • Player Names
  • QoS Discovery
  • Relay Allocations
  • Session Observability
  • Vivox Voice and Text Chat
Unity
  • Projects and Apps
Unity Pipeline
  • Asset Pipeline
  1. Unity Services Web APIs

Authenticate and call the Unity Version Control server REST API

Get an access token and use it to call the Unity Version Control server REST API on Unity Version Control Cloud or on an on-premises server.
阅读时间2 分钟
最后更新于 11 天前

Every Unity Version Control server REST API endpoint belongs to an organization, and every endpoint except the login endpoints requires a bearer token. Authenticate first, then send the access token that the server returns with each request that follows.
Use any programming language capable of making HTTP calls to interact with the API. Make sure you use the right HTTP method and include the request body that the endpoint expects.

Prerequisites

Before you start, find the base URI of the server that hosts your organization:
  • On Unity Version Control Cloud, look up the region that hosts your organization in the server table of the API Reference.
  • On an on-premises server, the API listens on the same port as the WebAdmin. By default, this is
    7178
    for unencrypted local access and
    7179
    for external HTTPS access.
警告
On an on-premises server, the REST API supports only user and password authentication and LDAP. To check the authentication mode of your server, open the WebAdmin and go to Configuration > Authentication.

Get an access token

The login endpoint returns two JSON Web Tokens: an access token that authorizes your requests, and a refresh token that you exchange for a new pair when the access token expires.
To get an access token:
  1. Send a
    POST
    request to
    /api/v1/organizations/{orgName}/login
    with your user name and password in the request body:
    curl --request POST \ --url https://prd-azure-westeu-01-cloud.plasticscm.com:7178/api/v1/organizations/my-organization/login \ --header 'Content-Type: application/json' \ --data '{"user":"my-user@example.com","password":"MY_PASSWORD"}'
  2. Read
    accessToken
    and
    refreshToken
    from the response:
    { "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."}
If the credentials are invalid, the server responds with a
401
status code.
When the access token expires, send the refresh token to
/api/v1/organizations/{orgName}/login/refresh
to get a new pair instead of sending your credentials again.

Call an endpoint

To call an endpoint with your access token:
  1. Set the
    Authorization
    header to
    Bearer
    followed by the access token.
  2. Send the request to the endpoint you need. For example, to list the repositories in an organization:
    curl --request GET \ --url https://prd-azure-westeu-01-cloud.plasticscm.com:7178/api/v1/organizations/my-organization/repos \ --header "Authorization: Bearer ${ACCESS_TOKEN}"
The server returns the repositories that your user can access. If the server rejects the request with a
401
status code, the access token is missing, invalid, or expired. Get a new token and send the request again.

Additional resources

  • Introduction to the Unity Version Control server REST API
  • Unity Version Control server REST API reference
  • Unity Version Control client REST API
  • Unity Version Control documentation

Copyright © 2026 Unity Technologies
法律信息隐私政策CookiesDocumentation Terms of Use请勿出售或分享我的个人信息您的隐私选择(Cookie 设置)

“Unity”、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属公司在美国和其他地方的商标或注册商标(此处查看更多信息)。其他名称或品牌是其各自所有者的商标。

为方便起见,一些页面是机器翻译的,可能包含不准确的内容。如有信息不一致的情况,以英文版本为准。

  • 在本页上
    • Prerequisites

    • Get an access token

    • Call an endpoint

    • Additional resources