Toggle the caller's like on a deck
curl --request POST \
--url https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/like \
--header 'Authorization: Bearer <token>' \
--header 'X-Partner-Id: <api-key>' \
--header 'X-Signature: <api-key>'import requests
url = "https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/like"
headers = {
"X-Signature": "<api-key>",
"X-Partner-Id": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Signature': '<api-key>',
'X-Partner-Id': '<api-key>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/like', 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://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/like",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Partner-Id: <api-key>",
"X-Signature: <api-key>"
],
]);
$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://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/like"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Signature", "<api-key>")
req.Header.Add("X-Partner-Id", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/like")
.header("X-Signature", "<api-key>")
.header("X-Partner-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/like")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Signature"] = '<api-key>'
request["X-Partner-Id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"is_liked": true,
"total_likes": 123
}Decks
Toggle the caller's like on a deck
Idempotent toggle: first call likes, second call unlikes. Requires per-user attribution (PAT or partner-on-behalf-of-user) — pure partner HMAC callers receive 401 FLEXSLOT_AUTHENTICATION_REQUIRED because there is no user to attribute the like to.
POST
/
api
/
public
/
v1
/
games
/
{game}
/
decks
/
{id}
/
like
Toggle the caller's like on a deck
curl --request POST \
--url https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/like \
--header 'Authorization: Bearer <token>' \
--header 'X-Partner-Id: <api-key>' \
--header 'X-Signature: <api-key>'import requests
url = "https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/like"
headers = {
"X-Signature": "<api-key>",
"X-Partner-Id": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Signature': '<api-key>',
'X-Partner-Id': '<api-key>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/like', 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://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/like",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Partner-Id: <api-key>",
"X-Signature: <api-key>"
],
]);
$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://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/like"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Signature", "<api-key>")
req.Header.Add("X-Partner-Id", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/like")
.header("X-Signature", "<api-key>")
.header("X-Partner-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexslot.gg/api/public/v1/games/{game}/decks/{id}/like")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Signature"] = '<api-key>'
request["X-Partner-Id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"is_liked": true,
"total_likes": 123
}Authorizations
PartnerHmac & PartnerSlug & PersonalAccessTokenPartnerHmac & PartnerSlugApiKeyPersonalAccessTokenOAuth2DPoP & OAuth2DPoPProofOAuth2Bearer
HMAC-SHA256 over canonical request string. Format: v1.<unix_seconds>.<hex_hmac_sha256>.
Partner identifier slug. Required alongside X-Signature for HMAC auth.
User-issued personal access token (format: flx_pat_).
Was this page helpful?
⌘I