curl --request POST \
--url https://sandbox-api.cardcore.cloud/institutions/oauth/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Banking App",
"description": "Banking application for managing customer accounts and transactions",
"publicKey": "-----BEGIN CERTIFICATE-----\nMIIBIjANBgkq...\n-----END CERTIFICATE-----",
"scopes": [
"READ",
"WRITE"
],
"grantType": "client_credentials",
"websiteUrl": "https://myapp.com",
"iconUrl": "https://myapp.com/icon.png",
"isOfficial": false
}
'import requests
url = "https://sandbox-api.cardcore.cloud/institutions/oauth/create"
payload = {
"name": "My Banking App",
"description": "Banking application for managing customer accounts and transactions",
"publicKey": "-----BEGIN CERTIFICATE-----
MIIBIjANBgkq...
-----END CERTIFICATE-----",
"scopes": ["READ", "WRITE"],
"grantType": "client_credentials",
"websiteUrl": "https://myapp.com",
"iconUrl": "https://myapp.com/icon.png",
"isOfficial": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Banking App',
description: 'Banking application for managing customer accounts and transactions',
publicKey: '-----BEGIN CERTIFICATE-----\nMIIBIjANBgkq...\n-----END CERTIFICATE-----',
scopes: ['READ', 'WRITE'],
grantType: 'client_credentials',
websiteUrl: 'https://myapp.com',
iconUrl: 'https://myapp.com/icon.png',
isOfficial: false
})
};
fetch('https://sandbox-api.cardcore.cloud/institutions/oauth/create', 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://sandbox-api.cardcore.cloud/institutions/oauth/create",
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' => 'My Banking App',
'description' => 'Banking application for managing customer accounts and transactions',
'publicKey' => '-----BEGIN CERTIFICATE-----
MIIBIjANBgkq...
-----END CERTIFICATE-----',
'scopes' => [
'READ',
'WRITE'
],
'grantType' => 'client_credentials',
'websiteUrl' => 'https://myapp.com',
'iconUrl' => 'https://myapp.com/icon.png',
'isOfficial' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://sandbox-api.cardcore.cloud/institutions/oauth/create"
payload := strings.NewReader("{\n \"name\": \"My Banking App\",\n \"description\": \"Banking application for managing customer accounts and transactions\",\n \"publicKey\": \"-----BEGIN CERTIFICATE-----\\nMIIBIjANBgkq...\\n-----END CERTIFICATE-----\",\n \"scopes\": [\n \"READ\",\n \"WRITE\"\n ],\n \"grantType\": \"client_credentials\",\n \"websiteUrl\": \"https://myapp.com\",\n \"iconUrl\": \"https://myapp.com/icon.png\",\n \"isOfficial\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("https://sandbox-api.cardcore.cloud/institutions/oauth/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Banking App\",\n \"description\": \"Banking application for managing customer accounts and transactions\",\n \"publicKey\": \"-----BEGIN CERTIFICATE-----\\nMIIBIjANBgkq...\\n-----END CERTIFICATE-----\",\n \"scopes\": [\n \"READ\",\n \"WRITE\"\n ],\n \"grantType\": \"client_credentials\",\n \"websiteUrl\": \"https://myapp.com\",\n \"iconUrl\": \"https://myapp.com/icon.png\",\n \"isOfficial\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.cardcore.cloud/institutions/oauth/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Banking App\",\n \"description\": \"Banking application for managing customer accounts and transactions\",\n \"publicKey\": \"-----BEGIN CERTIFICATE-----\\nMIIBIjANBgkq...\\n-----END CERTIFICATE-----\",\n \"scopes\": [\n \"READ\",\n \"WRITE\"\n ],\n \"grantType\": \"client_credentials\",\n \"websiteUrl\": \"https://myapp.com\",\n \"iconUrl\": \"https://myapp.com/icon.png\",\n \"isOfficial\": false\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"message": "Institution OAuth created successfully."
}Create OAuth Application
Register an OAuth application for an institution.
curl --request POST \
--url https://sandbox-api.cardcore.cloud/institutions/oauth/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Banking App",
"description": "Banking application for managing customer accounts and transactions",
"publicKey": "-----BEGIN CERTIFICATE-----\nMIIBIjANBgkq...\n-----END CERTIFICATE-----",
"scopes": [
"READ",
"WRITE"
],
"grantType": "client_credentials",
"websiteUrl": "https://myapp.com",
"iconUrl": "https://myapp.com/icon.png",
"isOfficial": false
}
'import requests
url = "https://sandbox-api.cardcore.cloud/institutions/oauth/create"
payload = {
"name": "My Banking App",
"description": "Banking application for managing customer accounts and transactions",
"publicKey": "-----BEGIN CERTIFICATE-----
MIIBIjANBgkq...
-----END CERTIFICATE-----",
"scopes": ["READ", "WRITE"],
"grantType": "client_credentials",
"websiteUrl": "https://myapp.com",
"iconUrl": "https://myapp.com/icon.png",
"isOfficial": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Banking App',
description: 'Banking application for managing customer accounts and transactions',
publicKey: '-----BEGIN CERTIFICATE-----\nMIIBIjANBgkq...\n-----END CERTIFICATE-----',
scopes: ['READ', 'WRITE'],
grantType: 'client_credentials',
websiteUrl: 'https://myapp.com',
iconUrl: 'https://myapp.com/icon.png',
isOfficial: false
})
};
fetch('https://sandbox-api.cardcore.cloud/institutions/oauth/create', 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://sandbox-api.cardcore.cloud/institutions/oauth/create",
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' => 'My Banking App',
'description' => 'Banking application for managing customer accounts and transactions',
'publicKey' => '-----BEGIN CERTIFICATE-----
MIIBIjANBgkq...
-----END CERTIFICATE-----',
'scopes' => [
'READ',
'WRITE'
],
'grantType' => 'client_credentials',
'websiteUrl' => 'https://myapp.com',
'iconUrl' => 'https://myapp.com/icon.png',
'isOfficial' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://sandbox-api.cardcore.cloud/institutions/oauth/create"
payload := strings.NewReader("{\n \"name\": \"My Banking App\",\n \"description\": \"Banking application for managing customer accounts and transactions\",\n \"publicKey\": \"-----BEGIN CERTIFICATE-----\\nMIIBIjANBgkq...\\n-----END CERTIFICATE-----\",\n \"scopes\": [\n \"READ\",\n \"WRITE\"\n ],\n \"grantType\": \"client_credentials\",\n \"websiteUrl\": \"https://myapp.com\",\n \"iconUrl\": \"https://myapp.com/icon.png\",\n \"isOfficial\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("https://sandbox-api.cardcore.cloud/institutions/oauth/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Banking App\",\n \"description\": \"Banking application for managing customer accounts and transactions\",\n \"publicKey\": \"-----BEGIN CERTIFICATE-----\\nMIIBIjANBgkq...\\n-----END CERTIFICATE-----\",\n \"scopes\": [\n \"READ\",\n \"WRITE\"\n ],\n \"grantType\": \"client_credentials\",\n \"websiteUrl\": \"https://myapp.com\",\n \"iconUrl\": \"https://myapp.com/icon.png\",\n \"isOfficial\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.cardcore.cloud/institutions/oauth/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Banking App\",\n \"description\": \"Banking application for managing customer accounts and transactions\",\n \"publicKey\": \"-----BEGIN CERTIFICATE-----\\nMIIBIjANBgkq...\\n-----END CERTIFICATE-----\",\n \"scopes\": [\n \"READ\",\n \"WRITE\"\n ],\n \"grantType\": \"client_credentials\",\n \"websiteUrl\": \"https://myapp.com\",\n \"iconUrl\": \"https://myapp.com/icon.png\",\n \"isOfficial\": false\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"message": "Institution OAuth created successfully."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The name your team will use to recognize this app.
"My Banking App"
The certificate public key for this app. Paste the content of the public key certificate you generated for the app.
"-----BEGIN CERTIFICATE-----\nMIIBIjANBgkq...\n-----END CERTIFICATE-----"
The permissions this app should have.
["READ", "WRITE"]
How this app will request access. Use client_credentials for server-to-server access, or authorization_code when a user must approve access.
client_credentials, authorization_code, refresh_token "client_credentials"
A short note that explains what this app is for.
"App used by our mobile banking customers"
The web addresses the system can send users back to after they approve access. Required when grantType is authorization_code.
[
"https://myapp.com/callback",
"https://myapp.com/oauth/callback"
]
The website for this app or business.
"https://myapp.com"
A link to the app's logo or icon.
"https://myapp.com/icon.png"
Set this to true if this is an official app owned by your institution.
false
Response
Create OAuth Application completed successfully.
The response is of type object.