

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Player Authentication API",
    "version": "1.0.1",
    "contact": {
      "url": "https://discussions.unity.com/tag/authentication"
    },
    "description": "# Introduction\nThis is the API specification for the Unity Authentication service that allows player authentication.\n\n## Rate Limits\nThe API has rate limiting in place. Most endpoints are limited to 15 requests per second on a per-IP basis, and 300 requests over 30 minutes.\nExceptions are outlined on a per-endpoint basis in the documentation below.\nThe API responds with a `429` HTTP status code if the rate limit is exceeded.\nIt also responds with a `Retry-After` header to be used in conjunction with a client's retry logic. The value is the number of seconds until a request for the given player to be accepted.\n"
  },
  "tags": [
    {
      "name": "Player Authentication",
      "description": "For more information about Unity Authentication and how to use these APIs, please read the [Client Authentication Documentation](https://services.docs.unity.com/docs/client-auth). It includes information about available authentication options, login states, and enforcing login state for the end player."
    }
  ],
  "servers": [
    {
      "url": "https://player-auth.services.api.unity.com"
    }
  ],
  "paths": {
    "/v1/authentication/anonymous": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        },
        {
          "$ref": "#/components/parameters/UnityEnvironment"
        }
      ],
      "post": {
        "operationId": "SignUpAnonymously",
        "summary": "Anonymous Sign Up",
        "description": "Sign-up a new anonymous player.",
        "tags": [
          "Player Authentication"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignUpAnonymouslyRequest"
              }
            }
          },
          "description": "Anonymous Sign Up request body",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationResponse"
                }
              }
            },
            "description": "A successful response."
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "403": {
            "description": "Permission Denied.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/authentication/external-token/{idProvider}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/idProvider"
        },
        {
          "$ref": "#/components/parameters/ProjectId"
        },
        {
          "$ref": "#/components/parameters/UnityEnvironment"
        }
      ],
      "post": {
        "operationId": "SignInWithExternalToken",
        "summary": "External Token Sign In",
        "description": "Authenticate players using external token. The external tokens are from login providers, such as Facebook.",
        "tags": [
          "Player Authentication"
        ],
        "requestBody": {
          "description": "External Token Authentication request body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignInWithExternalTokenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationResponse"
                }
              }
            },
            "description": "A successful response."
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "403": {
            "description": "Permission Denied.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/authentication/session-token": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        },
        {
          "$ref": "#/components/parameters/UnityEnvironment"
        }
      ],
      "post": {
        "operationId": "SignInWithSessionToken",
        "summary": "Session Token Sign In",
        "description": "Authenticate players using the session token. Store the session token in a persistent storage in the app or on device.",
        "tags": [
          "Player Authentication"
        ],
        "requestBody": {
          "description": "Session Token Authentication request body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignInWithSessionTokenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "403": {
            "description": "Permission Denied.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/authentication/link/{idProvider}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/idProvider"
        },
        {
          "$ref": "#/components/parameters/ProjectId"
        },
        {
          "$ref": "#/components/parameters/BearerAuth"
        }
      ],
      "post": {
        "operationId": "LinkExternalId",
        "summary": "Link External Id",
        "description": "Link an External Id to a Unity Authentication account",
        "tags": [
          "Player Authentication"
        ],
        "security": [
          {
            "Client": []
          }
        ],
        "requestBody": {
          "description": "Link External Id request body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkExternalIdRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkExternalIdResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "403": {
            "description": "Permission Denied.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/authentication/unlink/{idProvider}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/idProvider"
        },
        {
          "$ref": "#/components/parameters/ProjectId"
        },
        {
          "$ref": "#/components/parameters/BearerAuth"
        }
      ],
      "post": {
        "operationId": "UnlinkExternalId",
        "summary": "Unlink External Id",
        "description": "Unlink an external account from a Unity Authentication account.",
        "tags": [
          "Player Authentication"
        ],
        "security": [
          {
            "Client": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnlinkExternalIdRequest"
              }
            }
          },
          "description": "Unlink external Id request body",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnlinkExternalIdResponse"
                }
              }
            },
            "description": "A successful response."
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "403": {
            "description": "Permission Denied.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/authentication/usernamepassword/sign-up": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        },
        {
          "$ref": "#/components/parameters/UnityEnvironment"
        },
        {
          "name": "Authorization",
          "description": "This is the bearer token for the user authorized to call this API. When this is provided, a user associated with the bearer token is used instead of creating a new user.",
          "example": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
          "in": "header",
          "required": false,
          "allowEmptyValue": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "operationId": "SignUpWithUsernamePassword",
        "summary": "Username Password Sign Up",
        "description": "Create a new player for the Username Password IdProvider. Store the session token in a persistent storage in the app or on device.",
        "tags": [
          "Player Authentication"
        ],
        "security": [
          {
            "Client": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UsernamePasswordRequest"
              }
            }
          },
          "description": "The Username and Password of the player.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationResponse"
                }
              }
            },
            "description": "A successful response."
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "403": {
            "description": "Permission Denied.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/authentication/usernamepassword/sign-in": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        },
        {
          "$ref": "#/components/parameters/UnityEnvironment"
        }
      ],
      "post": {
        "operationId": "SignInWithUsernamePassword",
        "summary": "Username Password Sign In",
        "description": "Sign in using the Username Password IdProvider. Store the session token in a persistent storage in the app or on device.",
        "tags": [
          "Player Authentication"
        ],
        "security": [
          {
            "Client": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UsernamePasswordRequest"
              }
            }
          },
          "description": "The Username and Password of the player.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationResponse"
                }
              }
            },
            "description": "A successful response."
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "403": {
            "description": "Permission Denied.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/authentication/usernamepassword/update-password": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        },
        {
          "$ref": "#/components/parameters/BearerAuth"
        }
      ],
      "post": {
        "operationId": "UsernamePasswordUpdatePassword",
        "summary": "Username Password Update Password",
        "description": "Update the password of a player using the Username Password IdProvider. Store the session token in a persistent storage in the app or on device.",
        "tags": [
          "Player Authentication"
        ],
        "security": [
          {
            "Client": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UsernamePasswordPasswordUpdateRequest"
              }
            }
          },
          "description": "The Username, current Password and new Password of the player.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationResponse"
                }
              }
            },
            "description": "A successful response."
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "403": {
            "description": "Permission Denied.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/authentication/code-link/generate": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        },
        {
          "$ref": "#/components/parameters/UnityEnvironment"
        }
      ],
      "post": {
        "operationId": "GenerateCode",
        "summary": "Generate Code",
        "description": "Generates a sign in code for an unauthenticated device.",
        "tags": [
          "Player Authentication"
        ],
        "requestBody": {
          "description": "Generate Code Request Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateCodeRequest"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerateCodeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "403": {
            "description": "Permission Denied.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/authentication/code-link/sign-in/{CodeLinkSessionId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        },
        {
          "$ref": "#/components/parameters/UnityEnvironment"
        },
        {
          "$ref": "#/components/parameters/CodeLinkSessionId"
        }
      ],
      "post": {
        "operationId": "SignInWithCode",
        "summary": "Sign In With Code",
        "description": "Tries to sign in a user with code. In the case this returns 200 and an empty response, poll at regular intervals, 2-5s to avoid being rate limited, until you receive a different response.",
        "tags": [
          "Player Authentication"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignInWithCodeRequest"
              }
            }
          },
          "description": "Code Link Request for Sign In",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationResponse"
                }
              }
            },
            "description": "A successful response."
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "403": {
            "description": "Permission Denied.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/authentication/code-link/info": {
      "post": {
        "operationId": "GetCodeInfo",
        "summary": "Get Code Info",
        "description": "Get code information including the identifier and expiration.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "$ref": "#/components/parameters/UnityEnvironment"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CodeLinkInfoRequest"
              }
            }
          },
          "description": "Code Link Request for Sign In",
          "required": true
        },
        "tags": [
          "Player Authentication"
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeLinkInfoResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "403": {
            "description": "Permission Denied.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/authentication/code-link/confirm": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        },
        {
          "$ref": "#/components/parameters/UnityEnvironment"
        },
        {
          "$ref": "#/components/parameters/BearerAuth"
        }
      ],
      "post": {
        "operationId": "CodeConfirmation",
        "summary": "Code Confirmation",
        "description": "Allow a user to sign in to this account using this code",
        "tags": [
          "Player Authentication"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CodeLinkConfirmationRequest"
              }
            }
          },
          "description": "Code confirmation request.",
          "required": false
        },
        "responses": {
          "200": {
            "description": "A successful response."
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "403": {
            "description": "Permission Denied.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{ProjectId}/authentication/server/custom-id": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectIdPath"
        },
        {
          "$ref": "#/components/parameters/UnityEnvironment"
        }
      ],
      "post": {
        "summary": "Custom ID Sign In",
        "description": "Sign In using a Custom ID from a trusted server. This endpoint is limited to 500 RPS per IP address.",
        "operationId": "SignInWithCustomID",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomIDRequest"
              }
            }
          },
          "description": "Custom ID Request for Sign In",
          "required": true
        },
        "security": [
          {
            "Admin": [
              "player_auth.server.custom_id_auth"
            ]
          }
        ],
        "tags": [
          "Player Authentication"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationResponse"
                }
              }
            },
            "description": "A successful response."
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "403": {
            "description": "Permission Denied.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{PlayerId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/PlayerId"
        },
        {
          "$ref": "#/components/parameters/ProjectId"
        },
        {
          "$ref": "#/components/parameters/BearerAuth"
        }
      ],
      "get": {
        "operationId": "GetPlayer",
        "summary": "Get Player",
        "description": "Get the information for a player.",
        "tags": [
          "Player Authentication"
        ],
        "security": [
          {
            "Client": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlayerResponse"
                }
              }
            },
            "description": "A successful response."
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "403": {
            "description": "Permission Denied.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DeletePlayer",
        "summary": "Delete Player",
        "description": "Delete the player.",
        "tags": [
          "Player Authentication"
        ],
        "security": [
          {
            "Client": []
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response."
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "403": {
            "description": "Permission Denied.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{PlayerId}/notifications": {
      "parameters": [
        {
          "$ref": "#/components/parameters/BearerAuth"
        },
        {
          "$ref": "#/components/parameters/PlayerId"
        },
        {
          "$ref": "#/components/parameters/ProjectId"
        }
      ],
      "get": {
        "operationId": "ReadNotifications",
        "summary": "Read Notification",
        "description": "Gets a player's notifications to be displayed by the client.",
        "tags": [
          "Player Authentication"
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadNotificationsResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/jwks.json": {
      "get": {
        "operationId": "GetJSONWebKeySet",
        "summary": "Get JWKS",
        "description": "Get the JSON Web Key Set for validating authentication tokens.",
        "tags": [
          "Player Authentication"
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JSONWebKeySet"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticationError"
                }
              }
            }
          }
        }
      },
      "parameters": []
    }
  },
  "components": {
    "parameters": {
      "UnityEnvironment": {
        "name": "UnityEnvironment",
        "in": "header",
        "schema": {
          "type": "string",
          "nullable": true
        },
        "required": false,
        "allowEmptyValue": true,
        "description": "This is the Environment you want to authorize a player to access. It is the name of the Environment. If this header is not specified, then the default Environment is used. An invalid environment name is not an acceptable input.\n",
        "example": "production"
      },
      "ProjectId": {
        "name": "ProjectId",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "required": true,
        "allowEmptyValue": false,
        "description": "This is the Unity Project Id. It is a uuid format.\n",
        "example": "8bdacc33-6eef-4577-beb0-633c86259f5b"
      },
      "BearerAuth": {
        "name": "Authorization",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "required": false,
        "allowEmptyValue": false,
        "description": "This is the bearer token for the user authorized to call this API.\n",
        "example": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
      },
      "idProvider": {
        "name": "idProvider",
        "in": "path",
        "schema": {
          "type": "string"
        },
        "required": true,
        "allowEmptyValue": false,
        "description": "This is the id provider type.\n",
        "example": "identity-provider-name"
      },
      "PlayerId": {
        "name": "PlayerId",
        "in": "path",
        "schema": {
          "type": "string"
        },
        "required": true,
        "allowEmptyValue": false,
        "description": "This is the player id.\n",
        "example": "99i9ju8juh"
      },
      "CodeLinkSessionId": {
        "name": "CodeLinkSessionId",
        "in": "path",
        "schema": {
          "type": "string"
        },
        "required": true,
        "description": "An identifier for the device requesting the code sign in."
      },
      "ProjectIdPath": {
        "name": "ProjectId",
        "in": "path",
        "schema": {
          "type": "string"
        },
        "required": true,
        "description": "This is the Unity Project Id. It is a uuid format."
      }
    },
    "schemas": {
      "SignUpAnonymouslyRequest": {
        "title": "SignUpAnonymouslyRequest",
        "description": "the request body for anonymous signup",
        "type": "object",
        "properties": {
          "nonce": {
            "description": "String value used to associate a client session with an Id Token, and to mitigate replay attacks. If this field is provided, the nonce claim in response id token has a matching value.",
            "type": "string",
            "example": "9i09urd6ffg"
          }
        }
      },
      "AuthenticationResponse": {
        "title": "AuthenticationResponse",
        "description": "Response for an authentication request.",
        "type": "object",
        "required": [
          "expiresIn",
          "idToken",
          "userId",
          "user"
        ],
        "properties": {
          "expiresIn": {
            "description": "The number of seconds in which the Id token expires. By default it's 3600.",
            "format": "int32",
            "type": "integer",
            "example": 3600
          },
          "idToken": {
            "description": "The Id token of the authenticated player.",
            "type": "string",
            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
          },
          "sessionToken": {
            "description": "The session token of the authenticated player. This token can be used to sign-in the player again.",
            "type": "string",
            "example": "5eb26a338a232"
          },
          "lastNotificationDate": {
            "description": "When the player received last notification in unix timestamp.",
            "type": "string",
            "example": "123000000"
          },
          "user": {
            "$ref": "#/components/schemas/Player"
          },
          "userId": {
            "description": "The Id of the authenticated player. If a project is specified in the request, this field represents the Id of the project scoped player.",
            "type": "string",
            "example": "5eb26a338a232"
          }
        }
      },
      "LinkExternalIdResponse": {
        "title": "LinkExternalIdResponse",
        "description": "response for a link request",
        "type": "object",
        "required": [
          "user",
          "userId"
        ],
        "properties": {
          "user": {
            "$ref": "#/components/schemas/Player"
          },
          "userId": {
            "description": "The Id of the authenticated player. If a project is specified in the request, this field represents the Id of the project scoped player.",
            "type": "string",
            "example": "5eb26a338a232"
          }
        }
      },
      "UnlinkExternalIdResponse": {
        "title": "UnlinkExternalIdResponse",
        "description": "Response for an unlink request.",
        "type": "object",
        "required": [
          "user",
          "userId"
        ],
        "properties": {
          "user": {
            "$ref": "#/components/schemas/Player"
          },
          "userId": {
            "description": "The Id of the authenticated player. If a project is specified in the request, this field represents the Id of the project scoped player.",
            "type": "string",
            "example": "5eb26a338a232"
          }
        }
      },
      "ExternalId": {
        "title": "ExternalId",
        "description": "Represents a Player provided by an External Provider.",
        "type": "object",
        "required": [
          "externalId",
          "providerId"
        ],
        "properties": {
          "externalId": {
            "description": "The Id of the player from the external provider.",
            "type": "string",
            "example": "5eb26a338a232"
          },
          "providerId": {
            "description": "The provider Id within the Id domain that provided the link.",
            "type": "string",
            "example": "provider-id"
          }
        }
      },
      "SignInWithExternalTokenRequest": {
        "title": "SignInWithExternalTokenRequest",
        "description": "the request body for external token authentication",
        "type": "object",
        "required": [
          "token"
        ],
        "properties": {
          "nonce": {
            "description": "String value used to associate a client session with an Id token, and to mitigate replay attacks. If this field is provided, the nonce claim in response Id token has a matching value.",
            "type": "string",
            "example": "5eb26a338a232"
          },
          "signInOnly": {
            "description": "Whether the API should only attempt to sign-in and do not create a new player if the player does not exist.",
            "type": "boolean",
            "example": false
          },
          "token": {
            "description": "External token that can be verified to represent a player from the id provider. This may be an id token or an access token.",
            "type": "string",
            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpX"
          },
          "oculusConfig": {
            "$ref": "#/components/schemas/OculusConfig"
          },
          "appleGameCenterConfig": {
            "$ref": "#/components/schemas/AppleGameCenterConfig"
          },
          "steamConfig": {
            "$ref": "#/components/schemas/SteamConfig"
          }
        }
      },
      "OculusConfig": {
        "title": "OculusConfig",
        "description": "The request body for Oculus authentication. This field is not applicable for any other Id provider.",
        "type": "object",
        "required": [
          "userId"
        ],
        "properties": {
          "userId": {
            "description": "String value of the oculus player's Id.",
            "type": "string",
            "example": "5eb26a338a232"
          }
        }
      },
      "AppleGameCenterConfig": {
        "title": "AppleGameCenterConfig",
        "description": "The request body for Apple Game Center authentication. This field is not applicable for any other Id provider.",
        "type": "object",
        "required": [
          "teamPlayerId",
          "timestamp",
          "publicKeyUrl",
          "salt"
        ],
        "properties": {
          "teamPlayerId": {
            "description": "String value of the Apple Game Center player's team player Id.",
            "type": "string",
            "example": "5eb26a338a232"
          },
          "timestamp": {
            "description": "Integer value of the timestamp.",
            "type": "integer",
            "example": 389743847
          },
          "publicKeyUrl": {
            "description": "String value of the Apple Game Center public key url.",
            "type": "string",
            "example": "something.com/path.cert"
          },
          "salt": {
            "description": "String value of the base64 encoded salt.",
            "type": "string",
            "example": "ascfr=="
          }
        }
      },
      "SteamConfig": {
        "title": "SteamConfig",
        "description": "Identifying string passed as a parameter to Steam's GetAuthTicketForWebApi when the ticket was created, used to identify the entity calling this webapi. This should not be sent if no identity was passed issue a ticket from steam.",
        "properties": {
          "appId": {
            "description": "The app Id of the game.",
            "type": "string",
            "example": "123456"
          },
          "identity": {
            "description": "If this identity string was passed to GetAuthTicketForWebApi then the same value must be provided as the identity property. This value should be the comprised of alphanumeric characters with a length between 5 and 30.",
            "type": "string",
            "maxLength": 30,
            "minLength": 5
          }
        }
      },
      "JSONWebKey": {
        "title": "JSONWebKey",
        "description": "JSON Web Key for validating authentication tokens.",
        "type": "object",
        "required": [
          "alg",
          "kid",
          "use",
          "kty"
        ],
        "properties": {
          "alg": {
            "type": "string",
            "example": "RS256"
          },
          "e": {
            "type": "string",
            "example": "43urutru"
          },
          "kid": {
            "type": "string",
            "example": "public-0000000-0000-0000-0000-111111111111"
          },
          "kty": {
            "type": "string",
            "example": "RSA"
          },
          "n": {
            "title": "RSA public key",
            "type": "string",
            "example": "igu4jtou4389ru34890ut90i34r0-i39w4ru90u"
          },
          "crv": {
            "title": "ECDSA curve name",
            "type": "string"
          },
          "x": {
            "title": "ECDSA x coordinate",
            "type": "string"
          },
          "y": {
            "title": "ECDSA y coordinate",
            "type": "string"
          },
          "use": {
            "type": "string",
            "example": "sig"
          }
        }
      },
      "JSONWebKeySet": {
        "title": "JSONWebKeySet",
        "description": "JSON Web Key Set for validating authentication tokens.",
        "type": "object",
        "properties": {
          "keys": {
            "items": {
              "$ref": "#/components/schemas/JSONWebKey"
            },
            "type": "array"
          }
        }
      },
      "LinkExternalIdRequest": {
        "title": "LinkExternalIdRequest",
        "description": "the request body for link external id",
        "type": "object",
        "required": [
          "token"
        ],
        "properties": {
          "forceLink": {
            "description": "Force a link between the player specified in the UAS access token and the external Id. If a different UAS player is already linked to the external id, unlink that player from the external id before linking the request's player.",
            "type": "boolean",
            "example": false
          },
          "token": {
            "description": "External token that can be verified to represent a player from the Id provider. This may be an Id token or an access token.",
            "type": "string",
            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpX"
          },
          "oculusConfig": {
            "$ref": "#/components/schemas/OculusConfig"
          },
          "appleGameCenterConfig": {
            "$ref": "#/components/schemas/AppleGameCenterConfig"
          },
          "steamConfig": {
            "$ref": "#/components/schemas/SteamConfig"
          }
        }
      },
      "SignInWithSessionTokenRequest": {
        "title": "SignInWithSessionTokenRequest",
        "description": "the request body for session token authentication",
        "type": "object",
        "required": [
          "sessionToken"
        ],
        "properties": {
          "nonce": {
            "description": "String value used to associate a Client session with an Id Token, and to mitigate replay attacks. If this field is provided, the nonce claim in response Id token has a matching value.",
            "type": "string",
            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpX"
          },
          "sessionToken": {
            "description": "The session token of the player.",
            "type": "string",
            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpX"
          }
        }
      },
      "UnlinkExternalIdRequest": {
        "title": "UnlinkExternalIdRequest",
        "description": "The request body for unlink external id.",
        "type": "object",
        "required": [
          "externalId"
        ],
        "properties": {
          "externalId": {
            "description": "The external Id to unlink from the player account.",
            "type": "string",
            "example": "eyJhbGciOiJIUzI1Ni"
          }
        }
      },
      "GenerateCodeRequest": {
        "title": "GenerateCodeRequest",
        "description": "Request for generating a sign in code.",
        "type": "object",
        "required": [
          "codeChallenge"
        ],
        "properties": {
          "identifier": {
            "description": "Human-readable string to identify the requester device.",
            "type": "string",
            "example": "myDevice",
            "maxLength": 128
          },
          "codeChallenge": {
            "description": "SHA-256 string challenge for PKCE validation",
            "type": "string",
            "maxLength": 64
          }
        }
      },
      "GenerateCodeResponse": {
        "title": "GenerateCodeResponse",
        "description": "Response for code linking with information on the code.",
        "type": "object",
        "required": [
          "codeLinkSessionId",
          "signInCode",
          "expiration"
        ],
        "properties": {
          "codeLinkSessionId": {
            "description": "UUID identifying the code linking session.",
            "type": "string"
          },
          "signInCode": {
            "description": "The code required to perform the code confirmation.",
            "type": "string",
            "example": "f4j98K"
          },
          "expiration": {
            "description": "The timestamp for when the code is no longer valid in unix time since epoch.",
            "type": "string"
          }
        }
      },
      "SignInWithCodeRequest": {
        "title": "SignInWithCodeRequest",
        "description": "Request for checking if the code was confirmed.",
        "type": "object",
        "required": [
          "codeVerifier"
        ],
        "properties": {
          "codeVerifier": {
            "description": "Verifier for PKCE validation.",
            "type": "string",
            "minimum": 43,
            "maxLength": 128
          }
        }
      },
      "CodeLinkInfoRequest": {
        "title": "CodeLinkInfoRequest",
        "description": "Request information for a sign in code.",
        "type": "object",
        "required": [
          "signInCode"
        ],
        "properties": {
          "signInCode": {
            "description": "The code from which to get the info.",
            "type": "string"
          }
        }
      },
      "CodeLinkInfoResponse": {
        "title": "CodeLinkCheckConfirmationResponse",
        "description": "Information on the requested code",
        "type": "object",
        "required": [
          "expiration"
        ],
        "properties": {
          "identifier": {
            "description": "Human-readable string to identify the requester device.",
            "type": "string",
            "example": "myDevice"
          },
          "expiration": {
            "description": "The timestamp for when the code is no longer valid in unix time since epoch.",
            "type": "string"
          }
        }
      },
      "CodeLinkConfirmationRequest": {
        "title": "CodeLinkConfirmationRequest",
        "description": "Request for confirming the code linking.",
        "type": "object",
        "required": [
          "signInCode"
        ],
        "properties": {
          "signInCode": {
            "description": "The code returned in the GenerateCodeResponse.",
            "type": "string",
            "example": "f4j98K"
          },
          "sessionToken": {
            "description": "The authenticated device session token, for added security.",
            "type": "string"
          },
          "idProvider": {
            "description": "This is the id provider type. Only for consoles.",
            "type": "string"
          },
          "externalToken": {
            "description": "External token to validate the user. Only for consoles.",
            "type": "string"
          }
        }
      },
      "Player": {
        "title": "Player",
        "type": "object",
        "description": "Represents the player data.",
        "required": [
          "id",
          "disabled",
          "externalIds"
        ],
        "properties": {
          "disabled": {
            "description": "Whether the player is disabled by admin.",
            "type": "boolean",
            "example": false
          },
          "externalIds": {
            "description": "The list of linked external providers info. The list itself doesn't limit the number of external accounts linked with this player. In our current version, we allow only one external account of each type to link with the player. For example, you can't link two different Facebook Ids with the same player.",
            "items": {
              "$ref": "#/components/schemas/ExternalId"
            },
            "type": "array"
          },
          "id": {
            "description": "The player Id. The Id is unique within the Id domain.",
            "type": "string",
            "example": "eyJhbGciOiJIUzI1"
          },
          "username": {
            "description": "The username used to sign in using the Username Password IdProvider.",
            "type": "string",
            "example": "New_User_57"
          }
        }
      },
      "PlayerResponse": {
        "title": "PlayerResponse",
        "type": "object",
        "description": "Represents the player data.",
        "required": [
          "id",
          "createdAt",
          "lastLoginAt",
          "disabled",
          "externalIds"
        ],
        "properties": {
          "disabled": {
            "description": "Whether the player is disabled by admin.",
            "type": "boolean",
            "example": false
          },
          "externalIds": {
            "description": "This is the response returned when get player is called.",
            "items": {
              "$ref": "#/components/schemas/ExternalId"
            },
            "type": "array"
          },
          "id": {
            "description": "The player Id. The Id is unique within the Id domain.",
            "type": "string",
            "example": "eyJhbGciOiJIUzI1N"
          },
          "createdAt": {
            "description": "When the player was created. It is a unix timestamp.",
            "type": "string",
            "example": "123000000"
          },
          "lastLoginAt": {
            "description": "When the player last logged in. It is a unix timestamp.",
            "type": "string",
            "example": "123000000"
          },
          "usernamepassword": {
            "$ref": "#/components/schemas/usernamePasswordLoginMetadataResponse"
          }
        }
      },
      "usernamePasswordLoginMetadataResponse": {
        "type": "object",
        "description": "Information about the username/password account.",
        "required": [
          "username"
        ],
        "properties": {
          "username": {
            "description": "The username. Case insensitive. Length must be between 3-20 with the allowed characters a-z, 0-9 and the symbols [.][-][@][_].",
            "type": "string",
            "example": "New_User_57"
          },
          "createdAt": {
            "description": "When the username/password account was created. It is a unix timestamp.",
            "type": "string",
            "example": "123000000"
          },
          "lastLoginAt": {
            "description": "When the username/password account last logged in. It is a unix timestamp.",
            "type": "string",
            "example": "123000000"
          },
          "passwordUpdatedAt": {
            "description": "When the username/password account password was last updated. It is a unix timestamp.",
            "type": "string",
            "example": "123000000"
          }
        }
      },
      "AuthenticationError": {
        "type": "object",
        "required": [
          "title",
          "status",
          "detail"
        ],
        "properties": {
          "title": {
            "type": "string",
            "example": "Bad Request"
          },
          "status": {
            "type": "integer",
            "example": 400
          },
          "detail": {
            "type": "string",
            "example": "Something is wrong"
          },
          "details": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ReadNotificationsResponse"
                },
                {
                  "type": "object"
                }
              ]
            },
            "example": [
              {
                "code": "ERROR_CODE_123",
                "path": "nested.value",
                "message": "Invalid value"
              }
            ]
          }
        }
      },
      "UsernamePasswordRequest": {
        "title": "UsernamePasswordRequest",
        "description": "Request for signing up or signing in a Username Password account.",
        "type": "object",
        "required": [
          "username",
          "password"
        ],
        "properties": {
          "username": {
            "description": "The username. Case insensitive. Length must be between 3-20 with the allowed characters a-z, 0-9 and the symbols [.][-][@][_].",
            "type": "string",
            "example": "New_User_57"
          },
          "password": {
            "description": "The password. Length must be between 8-30 and contain at least one uppercase letter, at least one lowercase letter, at least one number and at least one symbol.",
            "type": "string",
            "example": "ThePassword123!"
          }
        }
      },
      "UsernamePasswordPasswordUpdateRequest": {
        "title": "UsernamePasswordPasswordUpdateRequest",
        "description": "Request for updating the password of a player using a Username Password account.",
        "type": "object",
        "required": [
          "password",
          "newPassword"
        ],
        "properties": {
          "password": {
            "description": "The password. Length must be between 8-30 and contain at least one uppercase letter, at least one lowercase letter, at least one number and at least one symbol.",
            "type": "string",
            "example": "ThePassword123!"
          },
          "newPassword": {
            "description": "The password to be changed. Length must be between 8-30 and contain at least one uppercase letter, at least one lowercase letter, at least one number and at least one symbol.",
            "type": "string",
            "example": "TheNewPassword456@"
          }
        }
      },
      "CustomIDRequest": {
        "title": "CustomIDRequest",
        "description": "Request for signing up or signing in a player with Custom ID.",
        "type": "object",
        "required": [
          "externalId"
        ],
        "properties": {
          "externalId": {
            "description": "The external id used to identify the player. Length must be between 1-320.",
            "type": "string",
            "example": "externalId"
          },
          "signInOnly": {
            "description": "Whether the API should only attempt to sign-in and do not create a new player if the player does not exist.",
            "type": "boolean",
            "example": false
          },
          "accessToken": {
            "description": "The access token for the account to be linked.",
            "type": "string",
            "example": "eyJhbGciOiJSUzI1NiIsImtpZCI6InB1YmxpYzo3MDdFQkJCNy05MEYzLTQ3NEYtOTA0NC02NDIzRUNDM0Q3NDkiLCJ0eXAiOiJKV1QifQ.eyJdWQiOlsiaWRkOmY1OWRmNDViLWY1YzUtNGE4Yy1iMmM0LWQzNDJiNmM5ZThkZiIsImVudk5hbWU6cHJvZHVjdGlvbiIsImVudklkOmRiNjQ5YzJiLWZjZTAtNDZkZS1iMGFhLTU1MzE1Y2VjYmUwNCIsInVwaWQ6NjU3YjViZGEtZWNmOS00NTFlLTk2NzMtODhlMjg4NTM2MzA1Il0sImV4cCI6MTcxMjg0NjA5NiwiaWF0IjoxNzEyODQyNDk2LCJpZGQiOiJmNTlkZjQ1Yi1mNWM1LTRhOGMtYjJjNC1kMzQyYjZjOWU4ZGYiLCJpc3MiOiJodHRwczovL3BsYXllci1hdXRoLXN0Zy5zZXJ2aWNlcy5hcGkudW5pdHkuY29tIiwianRpIjoiMjIyMjExNGUtMzE4Ni00ODljLTk3YzMtNjg4ZWI2NmJkNDVhIiwibmJmIjoxNzEyODQyNDk2LCJub25jZSI6Im51bGwiLCJwcm9qZWN0X2lkIjoiNjU3YjViZGEtZWNmOS00NTFlLTk2NzMtODhlMjg4NTM2MzA1Iiwic2lnbl9pbl9wcm92aWRlciI6ImFub255bW91cyIsInN1YiI6ImtzOWtJeW1iUnloMFVXVmVJbHBvVXZhR3ZueEoiLCJ0b2tlbl90eXBlIjoiYXV0aGVudGljYXRpb24iLCJ2ZXJzaW9uIjoiMSJ9.iVMwPYOp7qGNdzHS0CqWSdhGE7UTQOL_9J418zUJvlZtmDeslSSEinHAJn_Bv58yaVDNV1Z4dzSdKr5ixVDcxhVpe0lNkThFLRD6r2Ae36NNBKkSztBt9BD14k0_hwyU4beDrY7TUDHNfSppRczkBJAKp5T6eOt3rR9M7ilAOLJLd9Tz5l4aoJWkqG-V-S8qjkDvhiMdHE6HwGk2CVch5MGzTiBqHelCNoroA_cjkLFfUBkT4TTRUMBzXfrsyc8qat1iUPtAjxsvF91Y22d75PiPZAffSaCfT1vzIRWKZQcRH1QQl8BcSFUPGYAKrUKqlvP8njU1GuGYAluxJusseg"
          }
        }
      },
      "ReadNotificationsResponse": {
        "type": "object",
        "required": [
          "notifications"
        ],
        "properties": {
          "notifications": {
            "type": "array",
            "description": "List of notifications",
            "items": {
              "$ref": "#/components/schemas/Notification"
            }
          }
        }
      },
      "Notification": {
        "type": "object",
        "required": [
          "id",
          "type",
          "playerID",
          "caseID",
          "projectID",
          "message",
          "createdAt"
        ],
        "properties": {
          "id": {
            "description": "The notification identifier",
            "type": "string"
          },
          "type": {
            "description": "The notification type, defaults to DSA",
            "type": "string",
            "example": "DSA"
          },
          "playerID": {
            "description": "The player identifier",
            "type": "string"
          },
          "caseID": {
            "description": "The case identifier",
            "type": "string"
          },
          "projectID": {
            "description": "The project identifier",
            "type": "string"
          },
          "message": {
            "description": "The message content",
            "type": "string"
          },
          "createdAt": {
            "description": "Unix epoch time the notification was triggered",
            "type": "string"
          },
          "updatedAt": {
            "description": "Unix epoch time the notification was last updated",
            "type": "string"
          },
          "deletedAt": {
            "description": "Unix epoch time the notification was soft deleted",
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "Client": {
        "type": "http",
        "scheme": "bearer",
        "description": "To get started with Client Authentication, visit the [Client Authentication section](https://services.docs.unity.com/docs/client-auth)."
      },
      "Admin": {
        "type": "http",
        "scheme": "bearer",
        "description": "To get started with Authentication, please visit the [Service Account Authentication section](https://services.docs.unity.com/docs/service-account-auth)."
      }
    }
  }
}
```