> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cog888.net/llms.txt
> Use this file to discover all available pages before exploring further.

# User Login

> User login to game and get game URL

<Accordion title="Possible Error Codes for this API">
  | Code | Description         |
  | ---- | ------------------- |
  | 2    | Invalid parameter   |
  | 18   | Player is forbidden |
  | 36   | Server error        |
  | 9999 | Unknown error       |
</Accordion>


## OpenAPI

````yaml en/seamless-openapi.json POST /api/v1/dt/game
openapi: 3.1.0
info:
  title: Seamless Wallet API
  description: Seamless Wallet API documentation, including Game-API and Wallet-API
  version: 1.0.0
servers:
  - url: https://api.example.com
    description: API Server
security: []
tags:
  - name: Game-API User
    description: Game API - User operations
  - name: Game-API Report
    description: Game API - Report queries
  - name: Game-API Internal
    description: Game API - Internal use (hidden)
  - name: Wallet-API
    description: Wallet API - Implemented by vendor
paths:
  /api/v1/dt/game:
    post:
      tags:
        - Game-API User
      summary: User Login
      description: User login to game and get game URL
      operationId: launchGame
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - uuid
                - platform_id
                - username
                - transaction_id
                - credit
                - key
              properties:
                uuid:
                  type: string
                  description: >-
                    Platform-defined unique request serial number, length >= 32
                    and <= 128 bytes
                platform_id:
                  type: string
                  description: Platform product ID
                username:
                  type: string
                  description: >-
                    User account in game (max 23 characters, lowercase letters
                    and numbers only)
                transaction_id:
                  type: string
                  description: >-
                    Transaction serial number (1-128 characters, ASCII 32-126
                    printable characters only, ` and ~ are prohibited)
                credit:
                  type: string
                  description: >-
                    Credit to bring into game for this login, must be 0 for
                    seamless wallet
                lang:
                  type: string
                  description: Language code, optional
                key:
                  type: string
                  description: md5(username + credit + transaction_id + platform_secret)
                homeUrl:
                  type: string
                  description: >-
                    Online casino homepage, must be encoded with
                    encodeURIComponent
                registerUrl:
                  type: string
                  description: >-
                    Online casino registration URL, must be encoded with
                    encodeURIComponent
                depositUrl:
                  type: string
                  description: >-
                    Online casino deposit URL, must be encoded with
                    encodeURIComponent
                withdrawUrl:
                  type: string
                  description: >-
                    Online casino withdrawal URL, must be encoded with
                    encodeURIComponent
                extendSessionUrl:
                  type: string
                  description: >-
                    Online casino session extension URL, must be encoded with
                    encodeURIComponent
                theme_pid:
                  type: string
                  description: >-
                    UI skin pid to display, default value will be shown if not
                    provided
                title:
                  type: string
                  description: >-
                    Product name displayed on browser tab, COG will be shown if
                    not provided
                favicon:
                  type: string
                  description: >-
                    Product favicon displayed on browser tab, COG favicon will
                    be shown if not provided
                logoLandscape:
                  type: string
                  description: >-
                    Logo displayed in lobby landscape mode, COG logo will be
                    shown if not provided
                site:
                  type: string
                  description: >-
                    Pass 'app' string to hide the swipe-up fullscreen overlay on
                    mobile H5 landscape mode
                device:
                  type: string
                  description: >-
                    Device type, accepts PC or MB, defaults to PC if not
                    provided; the passed value is appended to the game URL as
                    device=PC or device=MB, and is omitted when not provided
            example:
              uuid: e69da788a6c841d4953c475fc42bf464
              platform_id: AXTES
              username: player001
              transaction_id: TX123456
              credit: '0'
              key: abc123hash
              homeUrl: https%3A%2F%2Fwww.example.com
              lang: zh-tw
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    description: >-
                      URL to redirect to game platform (same as the first item
                      of urls, kept for backward compatibility)
                  urls:
                    type: array
                    items:
                      type: string
                    description: >-
                      Array of game platform URLs for multiple routes (domain
                      rotation / failover); the first item equals url. When the
                      platform has only one route configured, the array contains
                      a single item
              example:
                url: >-
                  https://rel-game.cog888.net?pid=R01C05&token=zL13tWjRw2d0mHJSAkNtyNgjAsfTjavP6e9gQLpsOF-&homeUrl=home&registerUrl=register&depositUrl=deposit&withdrawUrl=withdraw&extendSessionUrl=extend&lang=en-us&closeAppOnLogout=1
                urls:
                  - >-
                    https://rel-game.cog888.net?pid=R01C05&token=zL13tWjRw2d0mHJSAkNtyNgjAsfTjavP6e9gQLpsOF-&homeUrl=home&registerUrl=register&depositUrl=deposit&withdrawUrl=withdraw&extendSessionUrl=extend&lang=en-us&closeAppOnLogout=1
                  - >-
                    https://rel-game.cog888.net2?pid=R01C05&token=zL13tWjRw2d0mHJSAkNtyNgjAsfTjavP6e9gQLpsOF-&homeUrl=home&registerUrl=register&depositUrl=deposit&withdrawUrl=withdraw&extendSessionUrl=extend&lang=en-us&closeAppOnLogout=1
                  - >-
                    https://rel-game.cog888.net3?pid=R01C05&token=zL13tWjRw2d0mHJSAkNtyNgjAsfTjavP6e9gQLpsOF-&homeUrl=home&registerUrl=register&depositUrl=deposit&withdrawUrl=withdraw&extendSessionUrl=extend&lang=en-us&closeAppOnLogout=1
        '400':
          description: Request Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 2
                  msg: >-
                    request hash signature(0FACF22B9E3DB5CDC670A0F7A65BB76A) is
                    error
                  uuid: 9e96610f-5388-42df-b3ed-ba1b3178c63b
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
        message:
          type: string
          description: Error message
        data:
          description: Data (usually null)
        status_code:
          type: integer
          description: HTTP status code
        service:
          type: string
          description: Service name

````