Exchange a code, or refresh
curl --request POST \
--url https://gamavas.fun/api/auth/oauth2/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'client_id=<string>' \
--data 'code=<string>' \
--data 'code_verifier=<string>' \
--data 'redirect_uri=<string>' \
--data 'refresh_token=<string>'const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
client_id: '<string>',
code: '<string>',
code_verifier: '<string>',
redirect_uri: '<string>',
refresh_token: '<string>'
})
};
fetch('https://gamavas.fun/api/auth/oauth2/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://gamavas.fun/api/auth/oauth2/token"
payload = {
"client_id": "<string>",
"code": "<string>",
"code_verifier": "<string>",
"redirect_uri": "<string>",
"refresh_token": "<string>"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text){
"access_token": "<string>",
"token_type": "<string>",
"expires_in": 123,
"refresh_token": "<string>",
"id_token": "<string>",
"scope": "<string>"
}{}Sign-in
Exchange a code, or refresh
Exchange the sign-in code (with the PKCE verifier) for tokens, or a refresh token for new ones. Refresh tokens rotate: keep the new one.
POST
/
auth
/
oauth2
/
token
Exchange a code, or refresh
curl --request POST \
--url https://gamavas.fun/api/auth/oauth2/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'client_id=<string>' \
--data 'code=<string>' \
--data 'code_verifier=<string>' \
--data 'redirect_uri=<string>' \
--data 'refresh_token=<string>'const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
client_id: '<string>',
code: '<string>',
code_verifier: '<string>',
redirect_uri: '<string>',
refresh_token: '<string>'
})
};
fetch('https://gamavas.fun/api/auth/oauth2/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://gamavas.fun/api/auth/oauth2/token"
payload = {
"client_id": "<string>",
"code": "<string>",
"code_verifier": "<string>",
"redirect_uri": "<string>",
"refresh_token": "<string>"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text){
"access_token": "<string>",
"token_type": "<string>",
"expires_in": 123,
"refresh_token": "<string>",
"id_token": "<string>",
"scope": "<string>"
}{}Body
application/x-www-form-urlencoded

