Create JWT Token
curl --request POST \
--url https://gateway.creditbenchmark.com/api/security/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data Username=your_username \
--data Password=your_passwordimport requests
url = "https://gateway.creditbenchmark.com/api/security/token"
payload = {
"Username": "your_username",
"Password": "your_password"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({Username: 'your_username', Password: 'your_password'})
};
fetch('https://gateway.creditbenchmark.com/api/security/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://gateway.creditbenchmark.com/api/security/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "Username=your_username&Password=your_password",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://gateway.creditbenchmark.com/api/security/token"
payload := strings.NewReader("Username=your_username&Password=your_password")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://gateway.creditbenchmark.com/api/security/token")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("Username=your_username&Password=your_password")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.creditbenchmark.com/api/security/token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "Username=your_username&Password=your_password"
response = http.request(request)
puts response.read_body{
"accessToken": "eyJraWQiOiJ4WldoaUZMd05OZ1VZVEtoVjVtam8tOFlvbTZ5Y0pyRXpGWlpqN3ltQ1E4IiwiYWxnIjoiUlMyNTYifQ...",
"expiresIn": 7200,
"tokenType": "Bearer"
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request payload is invalid."
}
}{
"detail": "Unauthorized request"
}{
"error": "An error occurred while processing your request. Please try again later."
}Create JWT Token
Create a JWT bearer token.
POST
/
api
/
security
/
token
Create JWT Token
curl --request POST \
--url https://gateway.creditbenchmark.com/api/security/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data Username=your_username \
--data Password=your_passwordimport requests
url = "https://gateway.creditbenchmark.com/api/security/token"
payload = {
"Username": "your_username",
"Password": "your_password"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({Username: 'your_username', Password: 'your_password'})
};
fetch('https://gateway.creditbenchmark.com/api/security/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://gateway.creditbenchmark.com/api/security/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "Username=your_username&Password=your_password",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://gateway.creditbenchmark.com/api/security/token"
payload := strings.NewReader("Username=your_username&Password=your_password")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://gateway.creditbenchmark.com/api/security/token")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("Username=your_username&Password=your_password")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.creditbenchmark.com/api/security/token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "Username=your_username&Password=your_password"
response = http.request(request)
puts response.read_body{
"accessToken": "eyJraWQiOiJ4WldoaUZMd05OZ1VZVEtoVjVtam8tOFlvbTZ5Y0pyRXpGWlpqN3ltQ1E4IiwiYWxnIjoiUlMyNTYifQ...",
"expiresIn": 7200,
"tokenType": "Bearer"
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request payload is invalid."
}
}{
"detail": "Unauthorized request"
}{
"error": "An error occurred while processing your request. Please try again later."
}Body
application/x-www-form-urlencoded
Last modified on July 10, 2026
Was this page helpful?
⌘I

