Skip to main content

Make your first request

This quickstart uses hosted auth to obtain a member token, then calls GET /v1/user with both required credentials.

Before you begin

In Settings > Developer Access in the TheFaithApp dashboard:
  1. Copy your client API key.
  2. Add the exact callback URL that will receive the member after sign-in.
For local development, save a dedicated callback such as http://localhost:3000/auth/callback. Production and local callback URLs must each be added explicitly.
1

Create a hosted sign-in URL

Generate a cryptographically random state value and send it with your callback URL.
The response includes auth_url. Open it in the system browser or a browser-based mobile auth session.
2

Validate the callback

After sign-in, the member returns to your callback URL:
Reject the callback if state does not exactly match the value stored when sign-in began. Exchange code immediately; it is short-lived and single-use.
3

Exchange the code

Store the returned access_token in secure server-side storage, an HTTP-only secure session cookie, Keychain, or Keystore.
4

Load the member

A successful response contains status: "Success" and the member record in data.

JavaScript example

Do not put a production client API key or member access token in frontend source code. Proxy sensitive calls through your backend when your runtime cannot protect credentials.

Next steps