Refresh Token
curl --request PUT \
--url https://{your-domain}.fincode.software/api/v6/services/securitymanagement/refresh-token \
--header 'Content-Type: application/json' \
--header 'platform: <platform>' \
--header 'uuid: <uuid>' \
--data '
{
"refresh_token": "<string>"
}
'import requests
url = "https://{your-domain}.fincode.software/api/v6/services/securitymanagement/refresh-token"
payload = { "refresh_token": "<string>" }
headers = {
"platform": "<platform>",
"uuid": "<uuid>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {platform: '<platform>', uuid: '<uuid>', 'Content-Type': 'application/json'},
body: JSON.stringify({refresh_token: '<string>'})
};
fetch('https://{your-domain}.fincode.software/api/v6/services/securitymanagement/refresh-token', 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://{your-domain}.fincode.software/api/v6/services/securitymanagement/refresh-token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'refresh_token' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"platform: <platform>",
"uuid: <uuid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{your-domain}.fincode.software/api/v6/services/securitymanagement/refresh-token"
payload := strings.NewReader("{\n \"refresh_token\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("platform", "<platform>")
req.Header.Add("uuid", "<uuid>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{your-domain}.fincode.software/api/v6/services/securitymanagement/refresh-token")
.header("platform", "<platform>")
.header("uuid", "<uuid>")
.header("Content-Type", "application/json")
.body("{\n \"refresh_token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{your-domain}.fincode.software/api/v6/services/securitymanagement/refresh-token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["platform"] = '<platform>'
request["uuid"] = '<uuid>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"refresh_token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyAuthentication
Refresh Token
Obtain a new access token and refresh token using a valid refresh token.
PUT
/
securitymanagement
/
refresh-token
Refresh Token
curl --request PUT \
--url https://{your-domain}.fincode.software/api/v6/services/securitymanagement/refresh-token \
--header 'Content-Type: application/json' \
--header 'platform: <platform>' \
--header 'uuid: <uuid>' \
--data '
{
"refresh_token": "<string>"
}
'import requests
url = "https://{your-domain}.fincode.software/api/v6/services/securitymanagement/refresh-token"
payload = { "refresh_token": "<string>" }
headers = {
"platform": "<platform>",
"uuid": "<uuid>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {platform: '<platform>', uuid: '<uuid>', 'Content-Type': 'application/json'},
body: JSON.stringify({refresh_token: '<string>'})
};
fetch('https://{your-domain}.fincode.software/api/v6/services/securitymanagement/refresh-token', 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://{your-domain}.fincode.software/api/v6/services/securitymanagement/refresh-token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'refresh_token' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"platform: <platform>",
"uuid: <uuid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{your-domain}.fincode.software/api/v6/services/securitymanagement/refresh-token"
payload := strings.NewReader("{\n \"refresh_token\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("platform", "<platform>")
req.Header.Add("uuid", "<uuid>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{your-domain}.fincode.software/api/v6/services/securitymanagement/refresh-token")
.header("platform", "<platform>")
.header("uuid", "<uuid>")
.header("Content-Type", "application/json")
.body("{\n \"refresh_token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{your-domain}.fincode.software/api/v6/services/securitymanagement/refresh-token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["platform"] = '<platform>'
request["uuid"] = '<uuid>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"refresh_token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyUse a valid refresh token to obtain a new pair of JWT access and refresh tokens without requiring the user to re-authenticate with email and password. This is essential for maintaining a long-lived user session.
Request Headers
string
default:"application/json"
required
Must be
application/jsonstring
default:"fincode"
required
Platform identifier. Use
fincodestring
default:"200"
required
Unique request identifier. Use
200Request Body
string
required
The refresh token obtained from the
/login or previous
/refresh-token response.Code Examples
curl -X PUT "https://{your-domain}.fincode.software/api/v6/services/securitymanagement/refresh-token" \
-H "Content-Type: application/json" \
-H "platform: fincode" \
-H "uuid: 200" \
-d '{
"refresh_token": "YOUR_VALID_REFRESH_TOKEN_HERE"
}'
Invalid Refresh Token (401)
Invalid Refresh Token (401)
- Prompt the user to log in again using email and password.
- Check the server logs to confirm token revocation status.
Token Already Used (403)
Token Already Used (403)
- Treat as a security breach. Force the user to log in again.
- Check if your system correctly overwrites the old refresh token with the new one.
