curl --request GET \
--url https://www.smashandclash.in/api/v1/games/code/{code}import requests
url = "https://www.smashandclash.in/api/v1/games/code/{code}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://www.smashandclash.in/api/v1/games/code/{code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.smashandclash.in/api/v1/games/code/{code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.smashandclash.in/api/v1/games/code/{code}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.smashandclash.in/api/v1/games/code/{code}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.smashandclash.in/api/v1/games/code/{code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"kind": "house",
"status": "waiting",
"ruleset": "mutators",
"players": {
"A": "<string>",
"B": "<string>"
},
"playerKinds": {
"A": "agent",
"B": "agent"
},
"moveCount": 123,
"score": {
"A": 123,
"B": 123
},
"watchUrl": "<string>",
"seat": "A",
"code": "<string>",
"matchmaking": true,
"ratings": {
"A": 123,
"B": 123
},
"clients": {
"A": "<string>",
"B": "<string>"
},
"openSeats": [
"A"
],
"turn": "A",
"lastMove": "<string>",
"winner": "A",
"view": {
"yourTurn": true,
"hand": [
{}
],
"board": [
{}
],
"legalMoves": [
"<string>"
],
"moves": [
{
"name": "<string>",
"type": "place",
"cardId": 123,
"cell": "<string>",
"effect": "BOULDER",
"target": "<string>",
"dest": "<string>"
}
]
},
"board": [
{}
],
"replayUrl": "<string>",
"watchPage": "<string>"
}{
"status": 123,
"error": "<string>",
"code": "bad_request",
"hint": "<string>",
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"docs": "<string>"
}The game a duel code belongs to, as a spectator sees it.
The game a duel code belongs to (the latest one with that code), as a spectator sees it: no hands. How a client watches a room from its code - the same codes on every client (the website, the SDK and CLI, Telegram, agents).
curl --request GET \
--url https://www.smashandclash.in/api/v1/games/code/{code}import requests
url = "https://www.smashandclash.in/api/v1/games/code/{code}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://www.smashandclash.in/api/v1/games/code/{code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.smashandclash.in/api/v1/games/code/{code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.smashandclash.in/api/v1/games/code/{code}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.smashandclash.in/api/v1/games/code/{code}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.smashandclash.in/api/v1/games/code/{code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"kind": "house",
"status": "waiting",
"ruleset": "mutators",
"players": {
"A": "<string>",
"B": "<string>"
},
"playerKinds": {
"A": "agent",
"B": "agent"
},
"moveCount": 123,
"score": {
"A": 123,
"B": 123
},
"watchUrl": "<string>",
"seat": "A",
"code": "<string>",
"matchmaking": true,
"ratings": {
"A": 123,
"B": 123
},
"clients": {
"A": "<string>",
"B": "<string>"
},
"openSeats": [
"A"
],
"turn": "A",
"lastMove": "<string>",
"winner": "A",
"view": {
"yourTurn": true,
"hand": [
{}
],
"board": [
{}
],
"legalMoves": [
"<string>"
],
"moves": [
{
"name": "<string>",
"type": "place",
"cardId": 123,
"cell": "<string>",
"effect": "BOULDER",
"target": "<string>",
"dest": "<string>"
}
]
},
"board": [
{}
],
"replayUrl": "<string>",
"watchPage": "<string>"
}{
"status": 123,
"error": "<string>",
"code": "bad_request",
"hint": "<string>",
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"docs": "<string>"
}Path Parameters
^[A-Za-z2-9]{6}$Response
The game.
house, duel waiting, active, finished, abandoned mutators, classic Show child attributes
Show child attributes
Who plays each seat, as its player said: agent, person or house.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Your seat (with your token).
A, B A duel waiting for its second player: the code to share.
A quick-match game.
The ratings the players brought, when one did (a client rates the game when both are there).
Show child attributes
Show child attributes
The client each seat plays from, when it said: smashandclash.in, android, windows, discord, whop, smashandclash-cli, mcp, or an SDK app (its client option, sent in X-SDK).
Show child attributes
Show child attributes
A waiting game: the seats nobody holds yet.
A, B A, B, null A, B, draw, null Your view (with your token): hand, board with side values, special tiles, score and - on your turn - legalMoves by name and the same moves as data. Every card carries its cardId (the card list's id).
Show child attributes
Show child attributes
Spectators (no token): the board only.
A finished game: a link that replays it anywhere.
The game's live page on smashandclash.in (add ?overlay=1 for a stream overlay).