Dynamic client registration (RFC 7591)
curl --request POST \
--url https://prod-auth.tktchurch.com/oauth/register \
--header 'Content-Type: application/json' \
--data '
{
"client_name": "<string>",
"redirect_uris": [
"<string>"
]
}
'import Foundation
let parameters = [
"client_name": "<string>",
"redirect_uris": ["<string>"]
] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://prod-auth.tktchurch.com/oauth/register")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["Content-Type": "application/json"]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({client_name: '<string>', redirect_uris: ['<string>']})
};
fetch('https://prod-auth.tktchurch.com/oauth/register', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://prod-auth.tktchurch.com/oauth/register"
payload = {
"client_name": "<string>",
"redirect_uris": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "c7d9e2b1-4f6a-4a8c-9e1d-abcdef012345",
"client_id": "dev-console",
"name": "Developers console",
"description": "Admin console at developers.tktchurch.com",
"is_active": true,
"is_system": true,
"locked_fields": [
"client_id",
"grant_types",
"redirect_uris",
"is_confidential"
],
"redirect_uris": [
"https://developers.tktchurch.com/callback"
],
"grant_types": [
"authorization_code",
"refresh_token"
]
}{
"error": "invalid_request",
"error_description": "Redirect URI not registered for this client"
}Dynamic client registration (RFC 7591)
Gated by DCR_ENABLED; may require an initial access token. First-party apps use bootstrap instead.
POST
/
oauth
/
register
Dynamic client registration (RFC 7591)
curl --request POST \
--url https://prod-auth.tktchurch.com/oauth/register \
--header 'Content-Type: application/json' \
--data '
{
"client_name": "<string>",
"redirect_uris": [
"<string>"
]
}
'import Foundation
let parameters = [
"client_name": "<string>",
"redirect_uris": ["<string>"]
] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://prod-auth.tktchurch.com/oauth/register")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["Content-Type": "application/json"]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({client_name: '<string>', redirect_uris: ['<string>']})
};
fetch('https://prod-auth.tktchurch.com/oauth/register', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://prod-auth.tktchurch.com/oauth/register"
payload = {
"client_name": "<string>",
"redirect_uris": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "c7d9e2b1-4f6a-4a8c-9e1d-abcdef012345",
"client_id": "dev-console",
"name": "Developers console",
"description": "Admin console at developers.tktchurch.com",
"is_active": true,
"is_system": true,
"locked_fields": [
"client_id",
"grant_types",
"redirect_uris",
"is_confidential"
],
"redirect_uris": [
"https://developers.tktchurch.com/callback"
],
"grant_types": [
"authorization_code",
"refresh_token"
]
}{
"error": "invalid_request",
"error_description": "Redirect URI not registered for this client"
}