The keys game tokens are signed with
curl --request GET \
--url https://patch.gg/api/v1/games/keysconst options = {method: 'GET'};
fetch('https://patch.gg/api/v1/games/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://patch.gg/api/v1/games/keys"
response = requests.get(url)
print(response.text){
"keys": [
{
"kty": "<string>",
"crv": "<string>",
"x": "<string>",
"y": "<string>",
"kid": "<string>",
"alg": "<string>",
"use": "<string>"
}
]
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}Games
The keys game tokens are signed with
A JSON Web Key Set. A game’s server checks a player’s token against it, with the issuer and its project’s id as the audience. Keys change rarely: cache them, and fetch them again when a token names a kid you don’t have.
GET
/
games
/
keys
The keys game tokens are signed with
curl --request GET \
--url https://patch.gg/api/v1/games/keysconst options = {method: 'GET'};
fetch('https://patch.gg/api/v1/games/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://patch.gg/api/v1/games/keys"
response = requests.get(url)
print(response.text){
"keys": [
{
"kty": "<string>",
"crv": "<string>",
"x": "<string>",
"y": "<string>",
"kid": "<string>",
"alg": "<string>",
"use": "<string>"
}
]
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}