Exchange Hosted Auth Code
curl --request POST \
--url https://api.thefaithapp.com/v1/auth/token \
--header 'Content-Type: application/json' \
--data '
{
"client_key": "your-public-client-key",
"code": "one-time-code",
"redirect_uri": "https://example.com/auth/callback",
"code_verifier": "your-original-43-to-128-character-verifier"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
client_key: 'your-public-client-key',
code: 'one-time-code',
redirect_uri: 'https://example.com/auth/callback',
code_verifier: 'your-original-43-to-128-character-verifier'
})
};
fetch('https://api.thefaithapp.com/v1/auth/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thefaithapp.com/v1/auth/token"
payload = {
"client_key": "your-public-client-key",
"code": "one-time-code",
"redirect_uri": "https://example.com/auth/callback",
"code_verifier": "your-original-43-to-128-character-verifier"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"token_type": "Bearer",
"access_token": "member-bearer-token",
"expires_in": null,
"member": {
"id": 123,
"uuid": "member-user-id",
"name": "Jane Doe",
"email": "jane@example.com",
"client_id": 45
}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}Hosted Auth
Exchange Hosted Auth Code
Exchanges a short-lived, single-use hosted auth code using the original S256 PKCE verifier and exact Redirect URL.
POST
/
v1
/
auth
/
token
Exchange Hosted Auth Code
curl --request POST \
--url https://api.thefaithapp.com/v1/auth/token \
--header 'Content-Type: application/json' \
--data '
{
"client_key": "your-public-client-key",
"code": "one-time-code",
"redirect_uri": "https://example.com/auth/callback",
"code_verifier": "your-original-43-to-128-character-verifier"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
client_key: 'your-public-client-key',
code: 'one-time-code',
redirect_uri: 'https://example.com/auth/callback',
code_verifier: 'your-original-43-to-128-character-verifier'
})
};
fetch('https://api.thefaithapp.com/v1/auth/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thefaithapp.com/v1/auth/token"
payload = {
"client_key": "your-public-client-key",
"code": "one-time-code",
"redirect_uri": "https://example.com/auth/callback",
"code_verifier": "your-original-43-to-128-character-verifier"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"token_type": "Bearer",
"access_token": "member-bearer-token",
"expires_in": null,
"member": {
"id": 123,
"uuid": "member-user-id",
"name": "Jane Doe",
"email": "jane@example.com",
"client_id": 45
}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}Body
application/json
Public client key copied from Developer Access.
One-time code returned to your Redirect URL.
The same Redirect URL used to start sign-in.
Original PKCE verifier used to create the S256 challenge.
Required string length:
43 - 128Pattern:
^[A-Za-z0-9\-._~]+$Was this page helpful?