Grant dependent consent (guardian)
curl --request POST \
--url https://prod-auth.tktchurch.com/api/v1/users/me/dependents/{dependentId}/consent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"consent_type": "data_processing"
}
'import Foundation
let parameters = ["consent_type": "data_processing"] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://prod-auth.tktchurch.com/api/v1/users/me/dependents/{dependentId}/consent")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"Authorization": "Bearer <token>",
"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: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({consent_type: 'data_processing'})
};
fetch('https://prod-auth.tktchurch.com/api/v1/users/me/dependents/{dependentId}/consent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://prod-auth.tktchurch.com/api/v1/users/me/dependents/{dependentId}/consent"
payload = { "consent_type": "data_processing" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"error": "invalid_request",
"error_description": "Redirect URI not registered for this client"
}{
"error": "invalid_token",
"error_description": "Access token is invalid or malformed"
}{
"error": "forbidden",
"error_description": "Missing required permission: client:read"
}{
"error": "not_found",
"error_description": "Client not found"
}Grant dependent consent (guardian)
Requires guardian:act_as + canActOnBehalf + data_processing consent. Requires guardian:act_as.
POST
/
api
/
v1
/
users
/
me
/
dependents
/
{dependentId}
/
consent
Grant dependent consent (guardian)
curl --request POST \
--url https://prod-auth.tktchurch.com/api/v1/users/me/dependents/{dependentId}/consent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"consent_type": "data_processing"
}
'import Foundation
let parameters = ["consent_type": "data_processing"] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://prod-auth.tktchurch.com/api/v1/users/me/dependents/{dependentId}/consent")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"Authorization": "Bearer <token>",
"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: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({consent_type: 'data_processing'})
};
fetch('https://prod-auth.tktchurch.com/api/v1/users/me/dependents/{dependentId}/consent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://prod-auth.tktchurch.com/api/v1/users/me/dependents/{dependentId}/consent"
payload = { "consent_type": "data_processing" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"error": "invalid_request",
"error_description": "Redirect URI not registered for this client"
}{
"error": "invalid_token",
"error_description": "Access token is invalid or malformed"
}{
"error": "forbidden",
"error_description": "Missing required permission: client:read"
}{
"error": "not_found",
"error_description": "Client not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Dependent id
Body
application/json
Consent being granted
Example:
"data_processing"
Response
Consent recorded
