After the user has authorized the request, the token or code obtained should be passed to this
complete function to allow us to exchange the code with the authentication server for a Credential.
After the object is created, the developer should use this method to interrogate it for the
authorization URL to which the user should be redirected to obtain permission.
PersistenceManager instance which this flow should use to interact with the
data store. The caller must remember to call PersistenceManager#close() after this
method returns.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["# Interface ThreeLeggedFlow (1.39.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.39.0 (latest)](/java/docs/reference/google-oauth-client/latest/com.google.api.client.extensions.auth.helpers.ThreeLeggedFlow)\n- [1.38.2](/java/docs/reference/google-oauth-client/1.38.2/com.google.api.client.extensions.auth.helpers.ThreeLeggedFlow)\n- [1.37.0](/java/docs/reference/google-oauth-client/1.37.0/com.google.api.client.extensions.auth.helpers.ThreeLeggedFlow)\n- [1.36.0](/java/docs/reference/google-oauth-client/1.36.0/com.google.api.client.extensions.auth.helpers.ThreeLeggedFlow)\n- [1.34.1](/java/docs/reference/google-oauth-client/1.34.1/com.google.api.client.extensions.auth.helpers.ThreeLeggedFlow)\n- [1.33.3](/java/docs/reference/google-oauth-client/1.33.3/com.google.api.client.extensions.auth.helpers.ThreeLeggedFlow)\n- [1.32.1](/java/docs/reference/google-oauth-client/1.32.1/com.google.api.client.extensions.auth.helpers.ThreeLeggedFlow) \n\n public interface ThreeLeggedFlow\n\n**Deprecated.** *Use [com.google.api.client.auth.oauth2.AuthorizationCodeFlow](/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth2.AuthorizationCodeFlow).*\n\nBeta \n\nInterface for auth flows that require a user authorization step through a web browser to obtain\nan authorization code.\n\nImplementations are required to be PersistenceCapable for storage in JDO compliant\ndatastores during user authorization step.\n\nWarning: starting with version 1.7, usage of this for OAuth 2.0 is deprecated. Instead use\n[com.google.api.client.auth.oauth2.AuthorizationCodeFlow](/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth2.AuthorizationCodeFlow).\n\nMethods\n-------\n\n### complete(String authorizationCode) (deprecated)\n\n public abstract Credential complete(String authorizationCode)\n\nAfter the user has authorized the request, the token or code obtained should be passed to this\ncomplete function to allow us to exchange the code with the authentication server for a [Credential](/java/docs/reference/google-oauth-client/latest/com.google.api.client.extensions.auth.helpers.Credential).\n\n### getAuthorizationUrl() (deprecated)\n\n public abstract String getAuthorizationUrl()\n\nAfter the object is created, the developer should use this method to interrogate it for the\nauthorization URL to which the user should be redirected to obtain permission.\n\n### loadCredential(PersistenceManager pm) (deprecated)\n\n public abstract Credential loadCredential(PersistenceManager pm)\n\nConvenience function that will load a credential based on the userId for which this flow was\ninstantiated.\n\n### setHttpTransport(HttpTransport transport) (deprecated)\n\n public abstract void setHttpTransport(HttpTransport transport)\n\nSet HttpTransport instance for this three legged flow.\n\n### setJsonFactory(JsonFactory jsonFactory) (deprecated)\n\n public abstract void setJsonFactory(JsonFactory jsonFactory)\n\nSet JsonFactory instance for this three legged flow."]]