# OAuthResponse.Builder

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/wear/phone/interactions/authentication/OAuthResponse.Builder "View this page in Java")

<br />

```
class OAuthResponse.Builder
```

<br />

*** ** * ** ***

Builder for constructing new instance of authentication response.

## Summary

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

|                                                             ### Public functions                                                              |
|-----------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [OAuthResponse](https://developer.android.com/reference/kotlin/androidx/wear/phone/interactions/authentication/OAuthResponse)                 | [build](https://developer.android.com/reference/kotlin/androidx/wear/phone/interactions/authentication/OAuthResponse.Builder#build())`()` Build the response instance specified by this builder                                                                                                                    |
| [OAuthResponse.Builder](https://developer.android.com/reference/kotlin/androidx/wear/phone/interactions/authentication/OAuthResponse.Builder) | [setErrorCode](https://developer.android.com/reference/kotlin/androidx/wear/phone/interactions/authentication/OAuthResponse.Builder#setErrorCode(kotlin.Int))`(errorCode: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Set the error code to indicate the request result status |
| [OAuthResponse.Builder](https://developer.android.com/reference/kotlin/androidx/wear/phone/interactions/authentication/OAuthResponse.Builder) | [setResponseUrl](https://developer.android.com/reference/kotlin/androidx/wear/phone/interactions/authentication/OAuthResponse.Builder#setResponseUrl(android.net.Uri))`(responseUrl: `[Uri](https://developer.android.com/reference/android/net/Uri.html)`)` 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)  

```
Builder()
```  

## Public functions

### build

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

```
fun build(): OAuthResponse
```

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)  

```
fun setErrorCode(errorCode: Int): OAuthResponse.Builder
```

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)  

```
fun setResponseUrl(responseUrl: Uri): OAuthResponse.Builder
```

Set the Url of the auth response