GET/api/public/authorize_oauth/{serviceType}

Authenticate a user with a third-party OAuth service

Authenticates a user through the specified third-party OAuth service. Use serviceType to select the provider and pass the authorization code and related redirect or invitation details when available. A successful response includes an access token and token type.

5 parameters
serviceTypestringrequired
The identifier of the third-party OAuth service.
codestringoptional
The authorization code returned by the OAuth provider.
redirect_uristringoptional
The redirect URI associated with the OAuth authorization request.
invitationCodestringoptional
An invitation code to associate with the authentication flow.
domainstringoptional
The domain associated with the authentication request.

5 status codes
200Returns an object containing the user's `accessToken` and the token type.
accessTokenstringoptional
tokenTypestringoptional
400Returned when the request or OAuth authorization details are invalid.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
401Returned when authentication is missing or invalid.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
403Returned when access to the requested operation is forbidden.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
404Returned when a requested resource was not found.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional

Error handling

A 400 indicates an invalid request, a 401 indicates missing or invalid authentication, and a 403 indicates forbidden access. A 404 indicates that a requested resource was not found; serviceType must identify the OAuth provider to use.