[[["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,["# Class OAuthParameters (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.auth.oauth.OAuthParameters)\n- [1.38.2](/java/docs/reference/google-oauth-client/1.38.2/com.google.api.client.auth.oauth.OAuthParameters)\n- [1.37.0](/java/docs/reference/google-oauth-client/1.37.0/com.google.api.client.auth.oauth.OAuthParameters)\n- [1.36.0](/java/docs/reference/google-oauth-client/1.36.0/com.google.api.client.auth.oauth.OAuthParameters)\n- [1.34.1](/java/docs/reference/google-oauth-client/1.34.1/com.google.api.client.auth.oauth.OAuthParameters)\n- [1.33.3](/java/docs/reference/google-oauth-client/1.33.3/com.google.api.client.auth.oauth.OAuthParameters)\n- [1.32.1](/java/docs/reference/google-oauth-client/1.32.1/com.google.api.client.auth.oauth.OAuthParameters) \n\n public final class OAuthParameters implements HttpExecuteInterceptor, HttpRequestInitializer\n\nBeta \n\nOAuth 1.0a parameter manager.\n\nThe only required non-computed fields are [#signer](/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth.OAuthParameters#com_google_api_client_auth_oauth_OAuthParameters_signer) and [#consumerKey](/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth.OAuthParameters#com_google_api_client_auth_oauth_OAuthParameters_consumerKey). Use [#token](/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth.OAuthParameters#com_google_api_client_auth_oauth_OAuthParameters_token) to specify token or temporary credentials.\n\nSample usage, taking advantage that this class implements HttpRequestInitializer: \n\n\n public static HttpRequestFactory createRequestFactory(HttpTransport transport) {\n OAuthParameters parameters = new OAuthParameters();\n // ...\n return transport.createRequestFactory(parameters);\n }\n \nIf you have a custom request initializer, take a look at the sample usage for HttpExecuteInterceptor, which this class also implements. \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e OAuthParameters \n\nImplements\n----------\n\ncom.google.api.client.http.HttpExecuteInterceptor, com.google.api.client.http.HttpRequestInitializer \n\nInherited Members\n-----------------\n\n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nStatic Methods\n--------------\n\n### escape(String value)\n\n public static String escape(String value)\n\nReturns the escaped form of the given value using OAuth escaping rules.\n\nConstructors\n------------\n\n### OAuthParameters()\n\n public OAuthParameters()\n\nFields\n------\n\n### callback\n\n public String callback\n\nAbsolute URI back to which the server will redirect the resource owner when the Resource Owner\nAuthorization step is completed.\n\n### consumerKey\n\n public String consumerKey\n\nRequired identifier portion of the client credentials (equivalent to a username).\n\n### nonce\n\n public String nonce\n\nRequired nonce value. Should be computed using [#computeNonce()](/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth.OAuthParameters#com_google_api_client_auth_oauth_OAuthParameters_computeNonce__).\n\n### realm\n\n public String realm\n\nRealm.\n\n### signature\n\n public String signature\n\nSignature. Required but normally computed using [#computeSignature](/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth.OAuthParameters#com_google_api_client_auth_oauth_OAuthParameters_computeSignature_).\n\n### signatureMethod\n\n public String signatureMethod\n\nName of the signature method used by the client to sign the request. Required, but normally\ncomputed using [#computeSignature](/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth.OAuthParameters#com_google_api_client_auth_oauth_OAuthParameters_computeSignature_).\n\n### signer\n\n public OAuthSigner signer\n\nRequired OAuth signature algorithm.\n\n### timestamp\n\n public String timestamp\n\nRequired timestamp value. Should be computed using [#computeTimestamp()](/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth.OAuthParameters#com_google_api_client_auth_oauth_OAuthParameters_computeTimestamp__).\n\n### token\n\n public String token\n\nToken value used to associate the request with the resource owner or `null` if the\nrequest is not associated with a resource owner.\n\n### verifier\n\n public String verifier\n\nThe verification code received from the server.\n\n### version\n\n public String version\n\nMust either be \"1.0\" or `null` to skip. Provides the version of the authentication\nprocess as defined in this specification.\n\nMethods\n-------\n\n### computeNonce()\n\n public void computeNonce()\n\nComputes a nonce based on the hex string of a random non-negative long, setting the value of\nthe [#nonce](/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth.OAuthParameters#com_google_api_client_auth_oauth_OAuthParameters_nonce) field.\n\n### computeSignature(String requestMethod, GenericUrl requestUrl)\n\n public void computeSignature(String requestMethod, GenericUrl requestUrl)\n\nComputes a new signature based on the fields and the given request method and URL, setting the\nvalues of the [#signature](/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth.OAuthParameters#com_google_api_client_auth_oauth_OAuthParameters_signature) and [#signatureMethod](/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth.OAuthParameters#com_google_api_client_auth_oauth_OAuthParameters_signatureMethod) fields.\n\n### computeTimestamp()\n\n public void computeTimestamp()\n\nComputes a timestamp based on the current system time, setting the value of the [#timestamp](/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth.OAuthParameters#com_google_api_client_auth_oauth_OAuthParameters_timestamp) field.\n\n### getAuthorizationHeader()\n\n public String getAuthorizationHeader()\n\nReturns the `Authorization` header value to use with the OAuth parameter values found in\nthe fields.\n\n### initialize(HttpRequest request)\n\n public void initialize(HttpRequest request)\n\n### intercept(HttpRequest request)\n\n public void intercept(HttpRequest request)"]]