End-user API (SDK)
Google sign-in, step 2: exchange the code for a session
POST/v1/client/oauth/token
Temel URL: https://eu.auth.foxlogin.app, https://tr.auth.foxlogin.app
Exchanges the fox_code from the redirect for a session and
answers like a password sign-in: a session, or mfa_required when
the user has TOTP on (finish with POST /v1/client/sign_in/mfa).
The code works once, for 2 minutes, and only with the publishable
key of the application that started the sign-in. Records
user.signed_in with method: google. Counts toward the limit of
20 code checks per minute per IP address.
Gövde application/json
codestringzorunluThe
fox_codequery parameter from the redirect. Works once, for 2 minutes.Örnek:
fxc_Q9xTa7Lm2Nb4Vc6Xz8Sd1Fg3Hj5Kl7Pq9Wr2Ey4Tu6I
Yanıtlar
200OKSession | MfaRequired
Signed in, or
mfa_requiredSession | MfaRequired
A session, or
mfa_requiredwhen the account has two-factor authentication on.Şunlardan biri:
Session
userEndUserProfileThe end-user object returned by the End-user API (SDK). Has no
phonefield; phone sign-in is not implemented.10 alan
idstringÖrnek:
usr_tr_8f2c91a7regionstringMore regions will be added; clients must accept unknown values.
Değerler:
EUTRemailstringemail_verifiedbooleannamestringboş olabilircountrystringISO 3166-1 alpha-2
statusstringOnly
activeis reachable through the SDK; other statuses cannot sign in.Örnek:
activelabelsLabelscreated_atstring (date-time)last_sign_in_atstringboş olabilir
session_idstringaccess_tokenstringrefresh_tokenstringtoken_type"Bearer"expires_in600
MfaRequired
status"mfa_required"zorunlumfa_tokenstringzorunluOpaque, 5-minute lifetime, 5 wrong codes invalidate it (
invalid_mfa_token).
400Bad RequestError
invalid_code: the code is wrong, used or expired, or the user is no longer active. Start the sign-in again.errorobjectzorunlu5 alan
codestringzorunluStable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable
Örnek:
region_unavailablemessagestringzorunluPlain English, for developers
regionstringboş olabilirRegion that produced the error, if any
Değerler:
EUTRretryablebooleanzorunludetailsobject
401UnauthorizedError
Missing or invalid key or token. The Management API answers
missing_api_key(no Bearer token) orinvalid_api_key(unknown or revoked secret key or organization API key).errorobjectzorunlu5 alan
codestringzorunluStable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable
Örnek:
region_unavailablemessagestringzorunluPlain English, for developers
regionstringboş olabilirRegion that produced the error, if any
Değerler:
EUTRretryablebooleanzorunludetailsobject
429Too Many RequestsError
rate_limited. Retry afterRetry-Afterseconds.errorobjectzorunlu5 alan
codestringzorunluStable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable
Örnek:
region_unavailablemessagestringzorunluPlain English, for developers
regionstringboş olabilirRegion that produced the error, if any
Değerler:
EUTRretryablebooleanzorunludetailsobject