Get the Google Calendar consent URL
Access: Bearer token required.
Returns the Google OAuth consent URL the client should open in the browser to connect the user's calendar. The URL requests only the https://www.googleapis.com/auth/calendar.events scope with offline access and forced consent, and embeds a signed state token (valid for 10 minutes) carrying the user id and the return path. After consent Google redirects the browser to GET /calendar/google/callback, which finishes the connection. returnPath must be an in-app path matching /app or /app/... (letters, digits, _, -, ., /); anything else is silently replaced by /app/inspections.
bearerAuthAuthorizationBearer <JWT>Access token returned by sign-in. Send it as Authorization: Bearer <token>.
returnPath?stringIn-app path to land on after the flow, e.g. /app/inspections. Must start with /app; otherwise /app/inspections is used.
"/app/inspections"Consent URL generated.
application/json- response
status*integersuccess*booleanmessage*stringdata*curl -X GET 'http://localhost:4000/api/v1/calendar/google/url'{ "status": 200, "success": true, "message": "Google Calendar authorization URL generated", "data": { "authUrl": "https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&prompt=consent&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcalendar.events&state=<signed-state>&response_type=code&client_id=<client-id>&redirect_uri=<redirect-uri>" }}
HomeLink Hub