Authentication
Get the Google OAuth consent URL
GET
Access: Public, no token needed.
Builds the Google OAuth 2.0 authorisation URL for the web sign-in flow and returns it as JSON; it does not redirect. Send the browser to data.authUrl. Google then redirects to the redirect URI configured for the chosen frontend with a code and a state (web, or app when app=true was passed), which the frontend forwards to GET /auth/google/callback. The requested scopes are the user's email and basic profile, with access_type=offline and prompt=consent.
app?stringPass true to use the OAuth client (and redirect URI) of the client app for agents and landlords; any other value or omission uses the consumer web app.
URL generated
application/json- response
status*integersuccess*booleanmessage*stringdata*curl -X GET 'http://localhost:4000/api/v1/auth/google'Example Response
{ "status": 200, "success": true, "message": "Google OAuth URL generated.", "data": { "authUrl": "https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&prompt=consent&state=web&response_type=code&client_id=<google-client-id>&redirect_uri=<configured-redirect-uri>" }}