curl --request POST \
--url http://localhost:3001/portal-api/apps \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"Name": "Payment App",
"Description": "This is my payment application",
"RedirectURLs": "https://app-host/auth",
"UserID": 1,
"Visibility": "personal"
}
'import requests
url = "http://localhost:3001/portal-api/apps"
payload = {
"Name": "Payment App",
"Description": "This is my payment application",
"RedirectURLs": "https://app-host/auth",
"UserID": 1,
"Visibility": "personal"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
Name: 'Payment App',
Description: 'This is my payment application',
RedirectURLs: 'https://app-host/auth',
UserID: 1,
Visibility: 'personal'
})
};
fetch('http://localhost:3001/portal-api/apps', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/portal-api/apps",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Name' => 'Payment App',
'Description' => 'This is my payment application',
'RedirectURLs' => 'https://app-host/auth',
'UserID' => 1,
'Visibility' => 'personal'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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 := "http://localhost:3001/portal-api/apps"
payload := strings.NewReader("{\n \"Name\": \"Payment App\",\n \"Description\": \"This is my payment application\",\n \"RedirectURLs\": \"https://app-host/auth\",\n \"UserID\": 1,\n \"Visibility\": \"personal\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.post("http://localhost:3001/portal-api/apps")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"Name\": \"Payment App\",\n \"Description\": \"This is my payment application\",\n \"RedirectURLs\": \"https://app-host/auth\",\n \"UserID\": 1,\n \"Visibility\": \"personal\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/portal-api/apps")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"Name\": \"Payment App\",\n \"Description\": \"This is my payment application\",\n \"RedirectURLs\": \"https://app-host/auth\",\n \"UserID\": 1,\n \"Visibility\": \"personal\"\n}"
response = http.request(request)
puts response.read_body{
"Name": "Payment App",
"Description": "This is my payment application",
"RedirectURLs": "https://app-host/auth",
"UserID": 1,
"Visibility": "personal",
"ID": 1,
"CreatedAt": "2023-06-25 13:37",
"AccessRequests": [
[
{
"Catalogue": "Public Catalogue",
"Client": "Payment application",
"CreatedAt": "2023-06-25 13:37",
"UpdatedAt": "2023-06-25 13:37",
"DeletedAt": "2023-06-25 13:37",
"Plan": "Free plan",
"User": "User#1",
"AuthType": "authToken",
"DCREnabled": false,
"ID": 1,
"ProvisionImmediately": true,
"Products": [
"Payment API"
],
"Credentials": [
{
"AccessRequest": "AccessRequest#2",
"Credential": "eyJvcmciOiI1ZTlkOTU0NGExZGNkNjAwMDFkMGVkMjAiLCJpZCI6IjY4MjZjZGViMmVlMzQ3ZGQ5ZjQ1ZWZmMjEyMTlhOWU1IiwiaCI6Im11cm11cjY0In0=",
"CredentialHash": "e1212449778b7ba4",
"DCRRegistrationAccessToken": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJmZjIyNmYyZi0yMDA0LTRlOWItOTFmOC1iOGYzOTA2ZDJmYTQifQ.eyJleHAiOjAsImlhdCI6MTY4NzczNzM5MCwianRpIjoiNjc3OTgwYjktZjgwMS00MmQ2LWI4OTItZDdkNDk1MmFhMjU5IiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo5OTk5L3JlYWxtcy9tYXN0ZXIiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0Ojk5OTkvcmVhbG1zL21hc3RlciIsInR5cCI6IlJlZ2lzdHJhdGlvbkFjY2Vzc1Rva2VuIiwicmVnaXN0cmF0aW9uX2F1dGgiOiJhdXRoZW50aWNhdGVkIn0.wyE93vktqlCywgtyJ8HBTjRPG9NvZEDR3zpSMncdwno",
"DCRRegistrationClientURI": "http://idp-host/realms/master/clients-registrations/openid-connect/cf4ab76c-c437-4ba2-8e94-1323269b5090",
"DCRResponse": "{\"redirect_uris\":[\"http://app-host/auth\"],\"token_endpoint_auth_method\":\"client_secret_basic\",\"grant_types\":[\"implicit\",\"client_credentials\"],\"response_types\":[\"id_token\",\"id_token token\"],\"client_id\":\"cf4ab76c-c437-4ba2-8e94-1323269b5090\",\"client_secret\":\"iDe9fkFNBDbVS5JOtYNUDIO8w8N6dWzf\",\"client_name\":\"OAuth2.0 client\",\"scope\":\"address phone offline_access microprofile-jwt\",\"subject_type\":\"public\",\"request_uris\":[],\"tls_client_certificate_bound_access_tokens\":false,\"client_id_issued_at\":1687737390,\"client_secret_expires_at\":0,\"registration_client_uri\":\"http://idp-host/realms/master/clients-registrations/openid-connect/cf4ab76c-c437-4ba2-8e94-1323269b5090\",\"registration_access_token\":\"eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJmZjIyNmYyZi0yMDA0LTRlOWItOTFmOC1iOGYzOTA2ZDJmYTQifQ.eyJleHAiOjAsImlhdCI6MTY4NzczNzM5MCwianRpIjoiNjc3OTgwYjktZjgwMS00MmQ2LWI4OTItZDdkNDk1MmFhMjU5IiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo5OTk5L3JlYWxtcy9tYXN0ZXIiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0Ojk5OTkvcmVhbG1zL21hc3RlciIsInR5cCI6IlJlZ2lzdHJhdGlvbkFjY2Vzc1Rva2VuIiwicmVnaXN0cmF0aW9uX2F1dGgiOiJhdXRoZW50aWNhdGVkIn0.wyE93vktqlCywgtyJ8HBTjRPG9NvZEDR3zpSMncdwno\",\"backchannel_logout_session_required\":false,\"require_pushed_authorization_requests\":false,\"frontchannel_logout_session_required\":false}",
"Expires": "1969-12-31 19:00",
"OAuthClientID": "cf4ab76c-c437-4ba2-8e94-1323269b5090",
"OAuthClientSecret": "iDe9fkFNBDbVS5JOtYNUDIO8w8N6dWzf",
"RedirectURI": "https://app-host/auth",
"ResponseType": "id_token token",
"Scope": "payment client",
"TokenEndpoints": "payment client"
}
]
}
]
]
}Create a new developer application
Create a new developer application
curl --request POST \
--url http://localhost:3001/portal-api/apps \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"Name": "Payment App",
"Description": "This is my payment application",
"RedirectURLs": "https://app-host/auth",
"UserID": 1,
"Visibility": "personal"
}
'import requests
url = "http://localhost:3001/portal-api/apps"
payload = {
"Name": "Payment App",
"Description": "This is my payment application",
"RedirectURLs": "https://app-host/auth",
"UserID": 1,
"Visibility": "personal"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
Name: 'Payment App',
Description: 'This is my payment application',
RedirectURLs: 'https://app-host/auth',
UserID: 1,
Visibility: 'personal'
})
};
fetch('http://localhost:3001/portal-api/apps', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/portal-api/apps",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Name' => 'Payment App',
'Description' => 'This is my payment application',
'RedirectURLs' => 'https://app-host/auth',
'UserID' => 1,
'Visibility' => 'personal'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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 := "http://localhost:3001/portal-api/apps"
payload := strings.NewReader("{\n \"Name\": \"Payment App\",\n \"Description\": \"This is my payment application\",\n \"RedirectURLs\": \"https://app-host/auth\",\n \"UserID\": 1,\n \"Visibility\": \"personal\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.post("http://localhost:3001/portal-api/apps")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"Name\": \"Payment App\",\n \"Description\": \"This is my payment application\",\n \"RedirectURLs\": \"https://app-host/auth\",\n \"UserID\": 1,\n \"Visibility\": \"personal\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/portal-api/apps")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"Name\": \"Payment App\",\n \"Description\": \"This is my payment application\",\n \"RedirectURLs\": \"https://app-host/auth\",\n \"UserID\": 1,\n \"Visibility\": \"personal\"\n}"
response = http.request(request)
puts response.read_body{
"Name": "Payment App",
"Description": "This is my payment application",
"RedirectURLs": "https://app-host/auth",
"UserID": 1,
"Visibility": "personal",
"ID": 1,
"CreatedAt": "2023-06-25 13:37",
"AccessRequests": [
[
{
"Catalogue": "Public Catalogue",
"Client": "Payment application",
"CreatedAt": "2023-06-25 13:37",
"UpdatedAt": "2023-06-25 13:37",
"DeletedAt": "2023-06-25 13:37",
"Plan": "Free plan",
"User": "User#1",
"AuthType": "authToken",
"DCREnabled": false,
"ID": 1,
"ProvisionImmediately": true,
"Products": [
"Payment API"
],
"Credentials": [
{
"AccessRequest": "AccessRequest#2",
"Credential": "eyJvcmciOiI1ZTlkOTU0NGExZGNkNjAwMDFkMGVkMjAiLCJpZCI6IjY4MjZjZGViMmVlMzQ3ZGQ5ZjQ1ZWZmMjEyMTlhOWU1IiwiaCI6Im11cm11cjY0In0=",
"CredentialHash": "e1212449778b7ba4",
"DCRRegistrationAccessToken": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJmZjIyNmYyZi0yMDA0LTRlOWItOTFmOC1iOGYzOTA2ZDJmYTQifQ.eyJleHAiOjAsImlhdCI6MTY4NzczNzM5MCwianRpIjoiNjc3OTgwYjktZjgwMS00MmQ2LWI4OTItZDdkNDk1MmFhMjU5IiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo5OTk5L3JlYWxtcy9tYXN0ZXIiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0Ojk5OTkvcmVhbG1zL21hc3RlciIsInR5cCI6IlJlZ2lzdHJhdGlvbkFjY2Vzc1Rva2VuIiwicmVnaXN0cmF0aW9uX2F1dGgiOiJhdXRoZW50aWNhdGVkIn0.wyE93vktqlCywgtyJ8HBTjRPG9NvZEDR3zpSMncdwno",
"DCRRegistrationClientURI": "http://idp-host/realms/master/clients-registrations/openid-connect/cf4ab76c-c437-4ba2-8e94-1323269b5090",
"DCRResponse": "{\"redirect_uris\":[\"http://app-host/auth\"],\"token_endpoint_auth_method\":\"client_secret_basic\",\"grant_types\":[\"implicit\",\"client_credentials\"],\"response_types\":[\"id_token\",\"id_token token\"],\"client_id\":\"cf4ab76c-c437-4ba2-8e94-1323269b5090\",\"client_secret\":\"iDe9fkFNBDbVS5JOtYNUDIO8w8N6dWzf\",\"client_name\":\"OAuth2.0 client\",\"scope\":\"address phone offline_access microprofile-jwt\",\"subject_type\":\"public\",\"request_uris\":[],\"tls_client_certificate_bound_access_tokens\":false,\"client_id_issued_at\":1687737390,\"client_secret_expires_at\":0,\"registration_client_uri\":\"http://idp-host/realms/master/clients-registrations/openid-connect/cf4ab76c-c437-4ba2-8e94-1323269b5090\",\"registration_access_token\":\"eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJmZjIyNmYyZi0yMDA0LTRlOWItOTFmOC1iOGYzOTA2ZDJmYTQifQ.eyJleHAiOjAsImlhdCI6MTY4NzczNzM5MCwianRpIjoiNjc3OTgwYjktZjgwMS00MmQ2LWI4OTItZDdkNDk1MmFhMjU5IiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo5OTk5L3JlYWxtcy9tYXN0ZXIiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0Ojk5OTkvcmVhbG1zL21hc3RlciIsInR5cCI6IlJlZ2lzdHJhdGlvbkFjY2Vzc1Rva2VuIiwicmVnaXN0cmF0aW9uX2F1dGgiOiJhdXRoZW50aWNhdGVkIn0.wyE93vktqlCywgtyJ8HBTjRPG9NvZEDR3zpSMncdwno\",\"backchannel_logout_session_required\":false,\"require_pushed_authorization_requests\":false,\"frontchannel_logout_session_required\":false}",
"Expires": "1969-12-31 19:00",
"OAuthClientID": "cf4ab76c-c437-4ba2-8e94-1323269b5090",
"OAuthClientSecret": "iDe9fkFNBDbVS5JOtYNUDIO8w8N6dWzf",
"RedirectURI": "https://app-host/auth",
"ResponseType": "id_token token",
"Scope": "payment client",
"TokenEndpoints": "payment client"
}
]
}
]
]
}Authorizations
Body
Name of this application
"Payment App"
Human-readable description of this application
"This is my payment application"
Redirect URL for OAuth2.0 authorization_code and PKCE grant types
"https://app-host/auth"
UID of a user to whom this application will belong
1
Controls who can access this application. Options are: personal (visible only to you), team (shared with your team), and organisation (accessible to all members of your organisation).
personal, team, organisation "personal"
Response
OK
Name of this application
"Payment App"
Human-readable description of this application
"This is my payment application"
Redirect URL for OAuth2.0 authorization_code and PKCE grant types
"https://app-host/auth"
UID of a user to whom this application will belong
1
Controls who can access this application. Options are: personal (visible only to you), team (shared with your team), and organisation (accessible to all members of your organisation).
personal, team, organisation "personal"
UID of this app
1
Timestamp of when this application was created
^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$"2023-06-25 13:37"
Show child attributes
Show child attributes
Was this page helpful?