Switch family profile
curl --request POST \
--url https://prod-auth.tktchurch.com/api/v1/users/me/families/switch-profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"profile_id": "<string>"
}
'import Foundation
let parameters = ["profile_id": "<string>"] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://prod-auth.tktchurch.com/api/v1/users/me/families/switch-profile")!
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({profile_id: '<string>'})
};
fetch('https://prod-auth.tktchurch.com/api/v1/users/me/families/switch-profile', 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/families/switch-profile"
payload = { "profile_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"access_token": "<string>",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "<string>",
"scope": "<string>",
"id_token": "<string>",
"issued_token_type": "<string>"
}{
"error": "invalid_request",
"error_description": "Redirect URI not registered for this client"
}{
"error": "invalid_token",
"error_description": "Access token is invalid or malformed"
}Switch family profile
Switch family profile. Requires a Bearer access token for the signed-in user.
POST
/
api
/
v1
/
users
/
me
/
families
/
switch-profile
Switch family profile
curl --request POST \
--url https://prod-auth.tktchurch.com/api/v1/users/me/families/switch-profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"profile_id": "<string>"
}
'import Foundation
let parameters = ["profile_id": "<string>"] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://prod-auth.tktchurch.com/api/v1/users/me/families/switch-profile")!
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({profile_id: '<string>'})
};
fetch('https://prod-auth.tktchurch.com/api/v1/users/me/families/switch-profile', 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/families/switch-profile"
payload = { "profile_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"access_token": "<string>",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "<string>",
"scope": "<string>",
"id_token": "<string>",
"issued_token_type": "<string>"
}{
"error": "invalid_request",
"error_description": "Redirect URI not registered for this client"
}{
"error": "invalid_token",
"error_description": "Access token is invalid or malformed"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Family profile to switch to
