Method: players.getScopedPlayerIds
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.
Truy xuất giá trị nhận dạng người chơi trong phạm vi của người dùng hiện đã được xác thực.
Yêu cầu HTTP
GET https://games.googleapis.com/games/v1/players/me/scopedIds
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
Giá trị nhận dạng người chơi trong phạm vi.
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:
Biểu diễn dưới dạng JSON |
{
"gamePlayerId": string,
"developerPlayerKey": string
} |
Trường |
gamePlayerId |
string
Giá trị nhận dạng người chơi ở phạm vi trò chơi. Đây chính là mã nhận dạng được trả về trong trường games.get gamePlayerId.
|
developerPlayerKey |
string
Giá trị nhận dạng của người chơi trong tất cả trò chơi của nhà phát triển cụ thể. Mỗi người chơi đều có cùng một developerPlayerKey trong tất cả trò chơi của một nhà phát triển. Các thay đổi quan trọng đối với người chơi dành cho nhà phát triển đối với trò chơi nếu trò chơi được chuyển cho một nhà phát triển khác. Xin lưu ý rằng gamePlayerId sẽ không thay đổ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.
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.getScopedPlayerIds\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ScopedPlayerIds.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nRetrieves scoped player identifiers for currently authenticated user.\n\n### HTTP request\n\n`GET https://games.googleapis.com/games/v1/players/me/scopedIds`\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nScoped player identifiers.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------|\n| ``` { \"gamePlayerId\": string, \"developerPlayerKey\": string } ``` |\n\n| Fields ||\n|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `gamePlayerId` | `string` Game-scoped player identifier. This is the same id that is returned in players.get gamePlayerId field. |\n| `developerPlayerKey` | `string` Identifier of the player across all games of the given developer. Every player has the same developerPlayerKey in all games of one developer. Developer player key changes for the game if the game is transferred to another developer. Note that gamePlayerId will stay unchanged. |\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)."]]