API reference / Accounts
post
/v2/accounts/google-sessionExchange a verified Google address for an applicant session
- Operation
createGoogleApplicantSession- Authentication
- API key
Server-to-server only, and only with the self-service tenant’s key. The public site verifies the Google address in its OAuth callback and calls this so a visitor who signed in with Google can see their applications under “My orders”. Only a confirmed applicant account is eligible; unknown, unconfirmed and suspended addresses all answer 404 so the route cannot be used as a membership oracle. The session is set in the `hv_app_session` cookie.
Request
Body
emailstringrequiredResponses
200A session was issued for the confirmed applicant account.
userAccountUserrequiredlinked_applicationsobject[]required400The request body or query failed validation.
errorobjectrequired401No API key was presented.
errorobjectrequired403The key is not the self-service tenant’s key, or the caller is not a key.
errorobjectrequired404No confirmed applicant account is linked to that address.
errorobjectrequiredExample
curl -X POST https://api.haavisa.com/v2/accounts/google-session \
-H "Authorization: Bearer $HAAVISA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "<email>"
}'More in Accounts
POST/v1/tokenGET/v1/token/introspectPOST/v1/token/mfaPOST/v1/token/revokePOST/v2/accountsGET/v2/accounts/mePATCH/v2/accounts/meGET/v2/accounts/me/messaging-consentPUT/v2/accounts/me/messaging-consentPOST/v2/accounts/mfa/activatePOST/v2/accounts/mfa/disablePOST/v2/accounts/mfa/enrollPOST/v2/accounts/password-resetPOST/v2/accounts/password-reset/confirmPOST/v2/accounts/sign-inPOST/v2/accounts/sign-outPOST/v2/accounts/verify-emailPOST/v2/accounts/verify-email/resend
Something unclear? The eligibility guide explains the model behind the answers; the errors guide covers the envelope.