Method: scores.submit
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Mengirim skor ke papan peringkat yang ditentukan.
Permintaan HTTP
POST https://games.googleapis.com/games/v1/leaderboards/{leaderboardId}/scores
Parameter jalur
Parameter |
leaderboardId |
string
ID papan peringkat.
|
Parameter kueri
Parameter |
language |
string
Bahasa yang lebih disukai untuk digunakan untuk string yang ditampilkan oleh metode ini.
|
score |
string (int64 format)
Wajib. Skor yang Anda kirimkan. Skor yang dikirimkan akan diabaikan jika lebih buruk daripada skor yang dikirimkan sebelumnya, dengan skor yang lebih buruk bergantung pada urutan pengurutan papan peringkat. Arti nilai skor bergantung pada jenis format papan peringkat. Untuk titik tetap, skor mewakili nilai mentah. Untuk waktu, skor mewakili waktu yang berlalu dalam milidetik. Untuk mata uang, skor mewakili nilai dalam unit mikro.
|
scoreTag |
string
Informasi tambahan tentang skor yang Anda kirimkan. Nilai tidak boleh berisi lebih dari 64 karakter yang aman untuk URI seperti yang ditentukan oleh bagian 2.3 RFC 3986.
|
Isi permintaan
Isi permintaan harus kosong.
Isi respons
Jika berhasil, isi respons berisi instance SubmitLeaderboardScoreResponse
.
Cakupan otorisasi
Memerlukan salah satu cakupan OAuth berikut:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
Untuk informasi selengkapnya, lihat Ringkasan OAuth 2.0.
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-27 UTC."],[],[],null,["# Method: scores.submit\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nSubmits a score to the specified leaderboard.\n\n### HTTP request\n\n`POST https://games.googleapis.com/games/v1/leaderboards/{leaderboardId}/scores`\n\n### Path parameters\n\n| Parameters ||\n|-----------------|-------------------------------------|\n| `leaderboardId` | `string` The ID of the leaderboard. |\n\n### Query parameters\n\n| Parameters ||\n|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `language` | `string` The preferred language to use for strings returned by this method. |\n| `score` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Required. The score you're submitting. The submitted score is ignored if it is worse than a previously submitted score, where worse depends on the leaderboard sort order. The meaning of the score value depends on the leaderboard format type. For fixed-point, the score represents the raw value. For time, the score represents elapsed time in milliseconds. For currency, the score represents a value in micro units. |\n| `scoreTag` | `string` Additional information about the score you're submitting. Values must contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [SubmitLeaderboardScoreResponse](/games/services/web/api/rest/v1/SubmitLeaderboardScoreResponse).\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)."]]