games.namespaces.createGameNamespaceTokenDevelopment


Description

Creates a development token for the given namespace.


Code Examples

# Write the request body to body.json before running
curl -X POST -d '@body.json' 'https://api.rivet.gg/cloud/games/{game_id}/namespaces/{namespace_id}/tokens/development'

Request Parameters

game_id

required path parameter

namespace_id

required path parameter

Request Body

  • hostname
    string

    The hostname used for the token.

  • ports
    union of empty object and object
      • ports.port
        number
      • ports.port_range
        object

        Range of ports that can be connected to. If configured, network_mode must equal host. Port ranges may overlap between containers, it is the responsibility of the developer to ensure ports are available before using. Read more about host networking here. Only available on Rivet Open Source & Enterprise.

        Related

        • cloud.version.matchmaker.PortProtocol
        • cloud.version.matchmaker.ProxyKind
        • ports.port_range.min
          number

          Unsigned 32 bit integer.

        • ports.port_range.max
          number

          Unsigned 32 bit integer.

      • ports.protocol
        string

        Signifies the protocol of the port. Note that when proxying through GameGuard (via ProxyKind), the port number returned by /find, /join, and /create will not be the same as the port number configured in the config:

        • With HTTP, the port will always be 80. The hostname of the port correctly routes the incoming connection to the correct port being used by the game server.
        • With HTTPS, the port will always be 443. The hostname of the port correctly routes the incoming connection to the correct port being used by the game server.
        • Using TCP/UDP, the port will be a random number between 26000 and 31999. This gets automatically routed to the correct port being used by the game server.

        Related - cloud.version.matchmaker.GameModeRuntimeDockerPort - cloud.version.matchmaker.ProxyKind - /docs/dynamic-servers/concepts/game-guard - matchmaker.lobbies.find

  • lobby_ports
    any value

Response Body

  • token
    string

    A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON.