ECHO supports Google OAuth2 as an alternative to creating an account with an email and password. When a user authenticates via Google, ECHO issues the same JWT Bearer token used by all other auth methods — so the rest of your API integration is identical regardless of how the user logged in.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/HelenaLM32/ECHO/llms.txt
Use this file to discover all available pages before exploring further.
OAuth flow
User authorizes on Google
Your frontend redirects the user to Google’s OAuth consent screen. After the user approves, Google redirects back to your frontend callback URL (e.g.,
/oauth/callback) with a one-time authorization code in the query string.Exchange the code for an ECHO JWT
Send the authorization Request bodyResponse — same shape as the If no ECHO account exists for this Google user, one is created automatically. The user’s Google user ID is stored as
code and the redirectUri you used to the ECHO backend. ECHO exchanges the code with Google, fetches the user’s profile, creates or looks up the ECHO account, and returns a JWT.The one-time authorization code returned by Google to your frontend callback URL.
The exact redirect URI registered with your Google OAuth app. Must match what was used to initiate the Google authorization.
/users/login response:provider_id, and provider is set to "google". No password is stored.The JWT token you receive from Google OAuth is identical in format and usage to a token obtained via
/users/login. Use it the same way: include it in the Authorization header as a Bearer token on every authenticated request.Using the token
Once your frontend has the JWT token from the OAuth callback, pass it in theAuthorization header on all subsequent API requests:
OAuth user accounts
Users who sign in via Google have accounts with the following characteristics:| Field | Value |
|---|---|
provider | "google" |
provider_id | The user’s Google account ID |
password | NULL — no password is stored |
/users/login with a password, since no password exists for their account. They must always authenticate through the Google OAuth flow.