Update my profile
curl --request PATCH \
--url https://prod-auth.tktchurch.com/api/v1/users/me \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"username": "<string>"
}
'import Foundation
let parameters = [
"first_name": "<string>",
"last_name": "<string>",
"username": "<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")!
var request = URLRequest(url: url)
request.httpMethod = "PATCH"
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: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({first_name: '<string>', last_name: '<string>', username: '<string>'})
};
fetch('https://prod-auth.tktchurch.com/api/v1/users/me', 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"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"username": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "b3e2f1a4-9c8d-4e7f-a6b5-0123456789ab",
"email": "[email protected]",
"username": "amina",
"first_name": "Amina",
"last_name": "Diallo",
"is_verified": true,
"mfa_enabled": true,
"roles": [
{
"slug": "member",
"permissions": [
"profile:read",
"profile:write"
]
}
]
}{
"error": "invalid_request",
"error_description": "Redirect URI not registered for this client"
}{
"error": "invalid_token",
"error_description": "Access token is invalid or malformed"
}Update my profile
Update my profile. Requires a Bearer access token for the signed-in user.
PATCH
/
api
/
v1
/
users
/
me
Update my profile
curl --request PATCH \
--url https://prod-auth.tktchurch.com/api/v1/users/me \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"username": "<string>"
}
'import Foundation
let parameters = [
"first_name": "<string>",
"last_name": "<string>",
"username": "<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")!
var request = URLRequest(url: url)
request.httpMethod = "PATCH"
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: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({first_name: '<string>', last_name: '<string>', username: '<string>'})
};
fetch('https://prod-auth.tktchurch.com/api/v1/users/me', 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"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"username": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "b3e2f1a4-9c8d-4e7f-a6b5-0123456789ab",
"email": "[email protected]",
"username": "amina",
"first_name": "Amina",
"last_name": "Diallo",
"is_verified": true,
"mfa_enabled": true,
"roles": [
{
"slug": "member",
"permissions": [
"profile:read",
"profile:write"
]
}
]
}{
"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
