Returns the error code ("invalid_request", "invalid_client",
"invalid_grant", "unauthorized_client", "unsupported_grant_type",
"invalid_scope", or an extension error code as specified in Defining Additional Error Codes).
Returns the human-readable text providing additional information, used to assist the client
developer in understanding the error that occurred or null for none.
Returns the URI identifying a human-readable web page with information about the error, used to
provide the client developer with additional information about the error or null for
none.
Sets the error code ("invalid_request", "invalid_client",
"invalid_grant", "unauthorized_client", "unsupported_grant_type",
"invalid_scope", or an extension error code as specified in Defining Additional Error Codes).
Overriding is only supported for the purpose of calling the super implementation and
changing the return type, but nothing else.
Sets the human-readable text providing additional information, used to assist the client
developer in understanding the error that occurred or null for none.
Overriding is only supported for the purpose of calling the super implementation and
changing the return type, but nothing else.
Sets the URI identifying a human-readable web page with information about the error, used to
provide the client developer with additional information about the error or null for
none.
Overriding is only supported for the purpose of calling the super implementation and
changing the return type, but nothing else.
[[["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 TokenErrorResponse (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.oauth2.TokenErrorResponse)\n- [1.38.2](/java/docs/reference/google-oauth-client/1.38.2/com.google.api.client.auth.oauth2.TokenErrorResponse)\n- [1.37.0](/java/docs/reference/google-oauth-client/1.37.0/com.google.api.client.auth.oauth2.TokenErrorResponse)\n- [1.36.0](/java/docs/reference/google-oauth-client/1.36.0/com.google.api.client.auth.oauth2.TokenErrorResponse)\n- [1.34.1](/java/docs/reference/google-oauth-client/1.34.1/com.google.api.client.auth.oauth2.TokenErrorResponse)\n- [1.33.3](/java/docs/reference/google-oauth-client/1.33.3/com.google.api.client.auth.oauth2.TokenErrorResponse)\n- [1.32.1](/java/docs/reference/google-oauth-client/1.32.1/com.google.api.client.auth.oauth2.TokenErrorResponse) \n\n public class TokenErrorResponse extends GenericJson\n\nOAuth 2.0 parser for an error access token response as specified in [Error Response](http://tools.ietf.org/html/rfc6749#section-5.2).\n\nImplementation is not thread-safe. \n\nInheritance\n-----------\n\n[Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e java.util.AbstractMap \\\u003e com.google.api.client.util.GenericData \\\u003e com.google.api.client.json.GenericJson \\\u003e TokenErrorResponse \n\nInherited Members\n-----------------\n\ncom.google.api.client.json.GenericJson.clone() \ncom.google.api.client.json.GenericJson.getFactory() \ncom.google.api.client.json.GenericJson.set(java.lang.String,java.lang.Object) \ncom.google.api.client.json.GenericJson.setFactory(com.google.api.client.json.JsonFactory) \ncom.google.api.client.json.GenericJson.toPrettyString() \ncom.google.api.client.json.GenericJson.toString() \ncom.google.api.client.util.GenericData.entrySet() \ncom.google.api.client.util.GenericData.equals(java.lang.Object) \ncom.google.api.client.util.GenericData.get(java.lang.Object) \ncom.google.api.client.util.GenericData.getClassInfo() \ncom.google.api.client.util.GenericData.getUnknownKeys() \ncom.google.api.client.util.GenericData.hashCode() \ncom.google.api.client.util.GenericData.put(java.lang.String,java.lang.Object) \ncom.google.api.client.util.GenericData.putAll(java.util.Map\\\u003c? extends java.lang.String,?\\\u003e) \ncom.google.api.client.util.GenericData.remove(java.lang.Object) \ncom.google.api.client.util.GenericData.setUnknownKeys(java.util.Map\\\u003cjava.lang.String,java.lang.Object\\\u003e) \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.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.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[AbstractMap.clear()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#clear--) \n[AbstractMap.containsKey(Object)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#containsKey-java.lang.Object-) \n[AbstractMap.containsValue(Object)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#containsValue-java.lang.Object-) \n[AbstractMap.isEmpty()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#isEmpty--) \n[AbstractMap.keySet()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#keySet--) \n[AbstractMap.put(K,V)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#put-K-V-) \n[AbstractMap.putAll(Map\\\u003c? extends K,? extends V\\\u003e)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#putAll-java.util.Map\u003c? extends K-? extends V\u003e-) \n[AbstractMap.size()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#size--) \n[AbstractMap.values()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#values--)\n\nConstructors\n------------\n\n### TokenErrorResponse()\n\n public TokenErrorResponse()\n\nMethods\n-------\n\n### clone()\n\n public TokenErrorResponse clone()\n\n**Overrides** \ncom.google.api.client.json.GenericJson.clone()\n\n### getError()\n\n public final String getError()\n\nReturns the error code (`\"invalid_request\"`, `\"invalid_client\"`, `\n\"invalid_grant\"`, `\"unauthorized_client\"`, `\"unsupported_grant_type\"`, `\n\"invalid_scope\"`, or an extension error code as specified in [Defining Additional Error Codes](http://tools.ietf.org/html/rfc6749#section-8.5)).\n\n### getErrorDescription()\n\n public final String getErrorDescription()\n\nReturns the human-readable text providing additional information, used to assist the client\ndeveloper in understanding the error that occurred or `null` for none.\n\n### getErrorUri()\n\n public final String getErrorUri()\n\nReturns the URI identifying a human-readable web page with information about the error, used to\nprovide the client developer with additional information about the error or `null` for\nnone.\n\n### set(String fieldName, Object value)\n\n public TokenErrorResponse set(String fieldName, Object value)\n\n**Overrides** \ncom.google.api.client.json.GenericJson.set(java.lang.String,java.lang.Object)\n\n### setError(String error)\n\n public TokenErrorResponse setError(String error)\n\nSets the error code (`\"invalid_request\"`, `\"invalid_client\"`, `\n\"invalid_grant\"`, `\"unauthorized_client\"`, `\"unsupported_grant_type\"`, `\n\"invalid_scope\"`, or an extension error code as specified in [Defining Additional Error Codes](http://tools.ietf.org/html/rfc6749#section-8.5)).\n\nOverriding is only supported for the purpose of calling the super implementation and\nchanging the return type, but nothing else.\n\n### setErrorDescription(String errorDescription)\n\n public TokenErrorResponse setErrorDescription(String errorDescription)\n\nSets the human-readable text providing additional information, used to assist the client\ndeveloper in understanding the error that occurred or `null` for none.\n\nOverriding is only supported for the purpose of calling the super implementation and\nchanging the return type, but nothing else.\n\n### setErrorUri(String errorUri)\n\n public TokenErrorResponse setErrorUri(String errorUri)\n\nSets the URI identifying a human-readable web page with information about the error, used to\nprovide the client developer with additional information about the error or `null` for\nnone.\n\nOverriding is only supported for the purpose of calling the super implementation and\nchanging the return type, but nothing else."]]