Get a join token for a server
const url = 'https://api.gampeon.com/v1/servers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/join';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.gampeon.com/v1/servers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/join \ --header 'Authorization: Bearer <token>'The launcher calls this right before it starts the game client and passes the token to the client in the environment variable GAMPEON_JOIN_TOKEN. The client sends it to the game server when it connects, and the game server checks it with POST /v1/servers/{id}/join/verify. Valid for 10 minutes, once, and only for this server.
If the server runs game packages of its project, packages lists their files and packageGrant allows downloading them with GET /v1/packages/files/{sha256} for 60 minutes. The launcher downloads missing files, checks their SHA-256 and starts the client with them.
Not available with access tokens.
Rate limit: 30 per 10 minutes per account.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Server ID
Responses
Section titled “Responses”Join token
object
Join token, 43 characters
Host name or IP of the server
Unix time in milliseconds
Game packages the server needs (empty without packages)
object
GAMPEON version the package needs
Bytes of all files
object
Path inside the package, such as GamCity.uplugin, Content/Paks/WindowsClient/GamCity….pak or Nui/icons/cash.png
Bytes
SHA-256, 64 hex characters
Download grant for packages, only when there are packages
Unix time in milliseconds
Example generated
{ "token": "example", "address": "example", "port": 1, "expiresAt": 1, "packages": [ { "name": "example", "version": "example", "engine": "example", "size": 1, "files": [ { "path": "example", "size": 1, "sha256": "example" } ] } ], "packageGrant": "example", "packageGrantExpiresAt": 1}Error codes: unauthorized
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: token_not_allowed
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: not_found
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: server_offline, server_full, package_unavailable
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Limit: 30 per 10 minutes per account. Error codes: rate_limited
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}