# Class TokenErrorResponse (1.39.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.39.0 (latest)](https://docs.cloud.google.com/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth2.TokenErrorResponse)
- [1.38.2](https://docs.cloud.google.com/java/docs/reference/google-oauth-client/1.38.2/com.google.api.client.auth.oauth2.TokenErrorResponse)
- [1.37.0](https://docs.cloud.google.com/java/docs/reference/google-oauth-client/1.37.0/com.google.api.client.auth.oauth2.TokenErrorResponse)
- [1.36.0](https://docs.cloud.google.com/java/docs/reference/google-oauth-client/1.36.0/com.google.api.client.auth.oauth2.TokenErrorResponse)
- [1.34.1](https://docs.cloud.google.com/java/docs/reference/google-oauth-client/1.34.1/com.google.api.client.auth.oauth2.TokenErrorResponse)
- [1.33.3](https://docs.cloud.google.com/java/docs/reference/google-oauth-client/1.33.3/com.google.api.client.auth.oauth2.TokenErrorResponse)
- [1.32.1](https://docs.cloud.google.com/java/docs/reference/google-oauth-client/1.32.1/com.google.api.client.auth.oauth2.TokenErrorResponse)

    public class TokenErrorResponse extends GenericJson

OAuth 2.0 parser for an error access token response as specified in [Error Response](http://tools.ietf.org/html/rfc6749#section-5.2).

Implementation is not thread-safe.

## Inheritance

[Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> java.util.AbstractMap \> com.google.api.client.util.GenericData \> com.google.api.client.json.GenericJson \> TokenErrorResponse

## Inherited Members

com.google.api.client.json.GenericJson.clone() com.google.api.client.json.GenericJson.getFactory() com.google.api.client.json.GenericJson.set(java.lang.String,java.lang.Object) com.google.api.client.json.GenericJson.setFactory(com.google.api.client.json.JsonFactory) com.google.api.client.json.GenericJson.toPrettyString() com.google.api.client.json.GenericJson.toString() com.google.api.client.util.GenericData.entrySet() com.google.api.client.util.GenericData.equals(java.lang.Object) com.google.api.client.util.GenericData.get(java.lang.Object) com.google.api.client.util.GenericData.getClassInfo() com.google.api.client.util.GenericData.getUnknownKeys() com.google.api.client.util.GenericData.hashCode() com.google.api.client.util.GenericData.put(java.lang.String,java.lang.Object) com.google.api.client.util.GenericData.putAll(java.util.Map\<? extends java.lang.String,?\>) com.google.api.client.util.GenericData.remove(java.lang.Object) com.google.api.client.util.GenericData.setUnknownKeys(java.util.Map\<java.lang.String,java.lang.Object\>) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-) [AbstractMap.clear()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#clear--) [AbstractMap.containsKey(Object)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#containsKey-java.lang.Object-) [AbstractMap.containsValue(Object)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#containsValue-java.lang.Object-) [AbstractMap.isEmpty()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#isEmpty--) [AbstractMap.keySet()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#keySet--) [AbstractMap.put(K,V)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#put-K-V-) [AbstractMap.putAll(Map\<? extends K,? extends V\>)](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#putAll-java.util.Map<? extends K-? extends V>-) [AbstractMap.size()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#size--) [AbstractMap.values()](https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html#values--)

## Constructors

### TokenErrorResponse()

    public TokenErrorResponse()

## Methods

### clone()

    public TokenErrorResponse clone()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth2.TokenErrorResponse` |   |

**Overrides** com.google.api.client.json.GenericJson.clone()

### getError()

    public final String getError()

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](http://tools.ietf.org/html/rfc6749#section-8.5)).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getErrorDescription()

    public final String getErrorDescription()

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** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getErrorUri()

    public final String getErrorUri()

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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### set(String fieldName, Object value)

    public TokenErrorResponse set(String fieldName, Object value)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `fieldName` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `value` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth2.TokenErrorResponse` |   |

**Overrides** com.google.api.client.json.GenericJson.set(java.lang.String,java.lang.Object)

### setError(String error)

    public TokenErrorResponse setError(String error)

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](http://tools.ietf.org/html/rfc6749#section-8.5)).

Overriding is only supported for the purpose of calling the super implementation and
changing the return type, but nothing else.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `error` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth2.TokenErrorResponse` |   |

### setErrorDescription(String errorDescription)

    public TokenErrorResponse setErrorDescription(String errorDescription)

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `errorDescription` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth2.TokenErrorResponse` |   |

### setErrorUri(String errorUri)

    public TokenErrorResponse setErrorUri(String errorUri)

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `errorUri` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-oauth-client/latest/com.google.api.client.auth.oauth2.TokenErrorResponse` |   |