> ## 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 and get game URL

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


## OpenAPI

````yaml en/transfer-openapi.json POST /api/v1/dt/game
openapi: 3.1.0
info:
  title: Transfer Wallet API
  description: Game-API for vendors to obtain game-related data
  version: 1.0.0
servers:
  - url: https://api.example.com
    description: Production server
security: []
paths:
  /api/v1/dt/game:
    post:
      tags:
        - User API
      summary: User Login
      description: User login and get game URL
      operationId: userLogin
      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 ID, 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 ID (1-128 characters, ASCII 32-126 printable
                    characters only, ` and ~ not allowed)
                credit:
                  type: string
                  description: Credit to bring into game for this login
                lang:
                  type: string
                  description: Language code (see appendix 'Language Codes'), optional
                key:
                  type: string
                  description: >-
                    md5(username + credit + transaction_id + platform secret
                    key)
                homeUrl:
                  type: string
                  description: >-
                    Online casino home page URL, must be encodeURIComponent
                    encoded
                registerUrl:
                  type: string
                  description: >-
                    Online casino registration URL, must be encodeURIComponent
                    encoded
                depositUrl:
                  type: string
                  description: >-
                    Online casino deposit URL, must be encodeURIComponent
                    encoded
                withdrawUrl:
                  type: string
                  description: >-
                    Online casino withdrawal URL, must be encodeURIComponent
                    encoded
                extendSessionUrl:
                  type: string
                  description: >-
                    Online casino extend session URL, must be encodeURIComponent
                    encoded
                theme_pid:
                  type: string
                  description: UI skin pid to display, default value if not provided
                title:
                  type: string
                  description: Product name shown in browser tab, defaults to COG
                favicon:
                  type: string
                  description: >-
                    Product favicon shown in browser tab, defaults to COG
                    favicon
                logoLandscape:
                  type: string
                  description: Logo displayed in landscape lobby, defaults to COG logo
                site:
                  type: string
                  description: >-
                    Pass 'app' string, will not show swipe-up fullscreen overlay
                    on mobile H5 landscape
                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
      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: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: 2
                  msg: >-
                    request hash signature(0FACF22B9E3DB5CDC670A0F7A65BB76A) is
                    error
                  uuid: 9e96610f-5388-42df-b3ed-ba1b3178c63b
components:
  schemas:
    Error:
      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

````