# OAuthResponse.Builder

Artifact: [androidx.wear:wear-phone-interactions](https://developer.android.com/jetpack/androidx/releases/wear) [View Source](https://cs.android.com/search?q=file:androidx/wear/phone/interactions/authentication/OAuthResponse.kt+class:androidx.wear.phone.interactions.authentication.OAuthResponse.Builder) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear#1.0.0)

*** ** * ** ***


```
public final class OAuthResponse.Builder
```

<br />

*** ** * ** ***

Builder for constructing new instance of authentication response.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/wear/phone/interactions/authentication/OAuthResponse.Builder#Builder()()` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/phone/interactions/authentication/OAuthResponse` | `https://developer.android.com/reference/androidx/wear/phone/interactions/authentication/OAuthResponse.Builder#build()()` Build the response instance specified by this builder |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/phone/interactions/authentication/OAuthResponse.Builder` | `https://developer.android.com/reference/androidx/wear/phone/interactions/authentication/OAuthResponse.Builder#setErrorCode(kotlin.Int)(int errorCode)` Set the error code to indicate the request result status |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/phone/interactions/authentication/OAuthResponse.Builder` | `https://developer.android.com/reference/androidx/wear/phone/interactions/authentication/OAuthResponse.Builder#setResponseUrl(android.net.Uri)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html responseUrl)` Set the Url of the auth response |

## Public constructors

### Builder

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear#1.0.0)

```
public Builder()
```

## Public methods

### build

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear#1.0.0)

```
public final @NonNull OAuthResponse build()
```

Build the response instance specified by this builder

### setErrorCode

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear#1.0.0)

```
public final @NonNull OAuthResponse.Builder setErrorCode(int errorCode)
```

Set the error code to indicate the request result status

### setResponseUrl

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear#1.0.0)

```
public final @NonNull OAuthResponse.Builder setResponseUrl(@NonNull Uri responseUrl)
```

Set the Url of the auth response