Scores: submitMultiple

Submits multiple scores to leaderboards. Try it now.

Request

HTTP request

POST https://www.googleapis.com/games/v1/leaderboards/scores

Parameters

Parameter name Value Description
Optional query parameters
language string The preferred language to use for strings returned by this method.

Authorization

This request requires authorization with the following scope:

Scope
https://www.googleapis.com/auth/games

For more information, see the authentication and authorization page.

Request body

In the request body, supply data with the following structure:

{
  "kind": "games#playerScoreSubmissionList",
  "scores": [
    {
      "kind": "games#scoreSubmission",
      "leaderboardId": string,
      "score": long,
      "scoreTag": string,
      "signature": string
    }
  ]
}
Property name Value Description Notes
kind string Uniquely identifies the type of this resource. Value is always the fixed string games#playerScoreSubmissionList.
scores[] list The score submissions.
scores[].kind string Uniquely identifies the type of this resource. Value is always the fixed string games#scoreSubmission.
scores[].leaderboardId string The leaderboard this score is being submitted to.
scores[].score long The new score being submitted. writable
scores[].scoreTag string Additional information about this score. Values will contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986.
scores[].signature string Signature Values will contain URI-safe characters as defined by section 2.3 of RFC 3986.

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "games#playerScoreListResponse",
  "submittedScores": [
    {
      "kind": "games#playerScoreResponse",
      "beatenScoreTimeSpans": [
        string
      ],
      "unbeatenScores": [
        {
          "kind": "games#playerScore",
          "timeSpan": string,
          "score": long,
          "formattedScore": string,
          "scoreTag": string
        }
      ],
      "formattedScore": string,
      "leaderboardId": string,
      "scoreTag": string
    }
  ]
}
Property name Value Description Notes
kind string Uniquely identifies the type of this resource. Value is always the fixed string games#playerScoreListResponse.
submittedScores[] list The score submissions statuses.
submittedScores[].kind string Uniquely identifies the type of this resource. Value is always the fixed string games#playerScoreResponse.
submittedScores[].beatenScoreTimeSpans[] list The time spans where the submitted score is better than the existing score for that time span.
Possible values are:
  • "ALL_TIME" - The score is an all-time score.
  • "WEEKLY" - The score is a weekly score.
  • "DAILY" - The score is a daily score.
submittedScores[].unbeatenScores[] list The scores in time spans that have not been beaten. As an example, the submitted score may be better than the player's DAILY score, but not better than the player's scores for the WEEKLY or ALL_TIME time spans.
submittedScores[].unbeatenScores[].kind string Uniquely identifies the type of this resource. Value is always the fixed string games#playerScore.
submittedScores[].unbeatenScores[].timeSpan string The time span for this player score.
Possible values are:
  • "ALL_TIME" - The score is an all-time score.
  • "WEEKLY" - The score is a weekly score.
  • "DAILY" - The score is a daily score.


Acceptable values are:
  • "ALL_TIME"
  • "DAILY"
  • "WEEKLY"
submittedScores[].unbeatenScores[].score long The numerical value for this player score.
submittedScores[].unbeatenScores[].formattedScore string The formatted score for this player score.
submittedScores[].unbeatenScores[].scoreTag string Additional information about this score. Values will contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986.
submittedScores[].formattedScore string The formatted value of the submitted score.
submittedScores[].leaderboardId string The leaderboard ID that this score was submitted to.
submittedScores[].scoreTag string Additional information about this score. Values will contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.