Method: players.getMultipleApplicationPlayerIds
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Lấy mã trình phát ứng dụng của người chơi hiện được xác thực trên tất cả các trò chơi được yêu cầu bởi cùng một nhà phát triển dưới dạng ứng dụng gọi. Thao tác này sẽ chỉ trả về mã nhận dạng cho những người chơi thực sự có mã nhận dạng (trong phạm vi hoặc cách khác) của trò chơi đó.
Yêu cầu HTTP
GET https://games.googleapis.com/games/v1/players/me/multipleApplicationPlayerIds
Tham số truy vấn
Tham số |
applicationIds[] |
string
Bắt buộc. Mã ứng dụng từ bảng điều khiển dành cho nhà phát triển trên Google Play cho các trò chơi để trả về mã nhận dạng có giới hạn.
|
Nội dung yêu cầu
Nội dung yêu cầu phải trống.
Nội dung phản hồi
Thông báo phản hồi cho games.getMultipleApplicationPlayerIds rpc.
Nếu thành công, phần nội dung phản hồi sẽ chứa dữ liệu có cấu trúc sau:
Trường |
playerIds[] |
object (ApplicationPlayerId )
Chỉ có đầu ra. Các ứng dụng được yêu cầu cùng với mã nhận dạng trong phạm vi của trình phát, nếu người chơi đó có mã nhận dạng cho ứng dụng. Nếu không, ứng dụng đó sẽ không được đưa vào câu trả lời.
|
Phạm vi uỷ quyền
Yêu cầu một trong các phạm vi OAuth sau:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
Để biết thêm thông tin, hãy xem bài viết Tổng quan về OAuth 2.0.
ApplicationPlayerId
Giá trị nhận dạng người chơi ở phạm vi chính của một ứng dụng.
Biểu diễn dưới dạng JSON |
{
"applicationId": string,
"playerId": string
} |
Trường |
applicationId |
string
Ứng dụng mà giá trị nhận dạng trình phát này dành cho.
|
playerId |
string
Giá trị nhận dạng trình phát của ứng dụng.
|
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2025-07-27 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-27 UTC."],[],[],null,["# Method: players.getMultipleApplicationPlayerIds\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.GetMultipleApplicationPlayerIdsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [ApplicationPlayerId](#ApplicationPlayerId)\n - [JSON representation](#ApplicationPlayerId.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nGet the application player ids for the currently authenticated player across all requested games by the same developer as the calling application. This will only return ids for players that actually have an id (scoped or otherwise) with that game.\n\n### HTTP request\n\n`GET https://games.googleapis.com/games/v1/players/me/multipleApplicationPlayerIds`\n\n### Query parameters\n\n| Parameters ||\n|--------------------|-----------------------------------------------------------------------------------------------------------------------|\n| `applicationIds[]` | `string` Required. The application IDs from the Google Play developer console for the games to return scoped ids for. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nResponse message for players.getMultipleApplicationPlayerIds rpc.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"playerIds\": [ { object (/games/services/web/api/rest/v1/players/getMultipleApplicationPlayerIds#ApplicationPlayerId) } ] } ``` |\n\n| Fields ||\n|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `playerIds[]` | `object (`[ApplicationPlayerId](/games/services/web/api/rest/v1/players/getMultipleApplicationPlayerIds#ApplicationPlayerId)`)` Output only. The requested applications along with the scoped ids for tha player, if that player has an id for the application. If not, the application is not included in the response. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/games`\n- `\n https://www.googleapis.com/auth/games_lite`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).\n\nApplicationPlayerId\n-------------------\n\nPrimary scoped player identifier for an application.\n\n| JSON representation |\n|---------------------------------------------------------|\n| ``` { \"applicationId\": string, \"playerId\": string } ``` |\n\n| Fields ||\n|-----------------|--------------------------------------------------------------|\n| `applicationId` | `string` The application that this player identifier is for. |\n| `playerId` | `string` The player identifier for the application. |"]]