# ActionCodeUrl


```
public class ActionCodeUrl
```

<br />

*** ** * ** ***

A utility class to parse parameters in action code URLs from out of band email flows.

## Summary

| ### Public fields |
|---|---|
| `final https://developer.android.com/reference/java/lang/String.html` | `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/ActionCodeUrl#apiKey()` |
| `final https://developer.android.com/reference/java/lang/String.html` | `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/ActionCodeUrl#code()` |
| `final @https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/String.html` | `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/ActionCodeUrl#continueUrl()` |
| `final @https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/String.html` | `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/ActionCodeUrl#languageCode()` |

| ### Public methods |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/ActionCodeUrl#getApiKey()()` Returns the API key from the link. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/String.html` | `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/ActionCodeUrl#getCode()()` Returns the email action code from the link if present, otherwise null. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/String.html` | `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/ActionCodeUrl#getContinueUrl()()` Returns the continue URL from the link if present, otherwise null. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/String.html` | `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/ActionCodeUrl#getLanguageCode()()` Returns the language code from the link if present, otherwise null. |
| `int` | `@https://firebase.google.com/docs/reference/android/com/google/firebase/auth/ActionCodeResult.Operation https://firebase.google.com/docs/reference/android/com/google/firebase/auth/ActionCodeUrl#getOperation()()` Returns the mapping of the mode string in the action code URL to a `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/ActionCodeResult.Operation`. |
| `static @https://developer.android.com/reference/androidx/annotation/Nullable.html https://firebase.google.com/docs/reference/android/com/google/firebase/auth/ActionCodeUrl` | `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/ActionCodeUrl#parseLink(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/String.html link)` Returns an `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/ActionCodeUrl` instance if the `link` is valid, otherwise null. |

## Public fields

### apiKey

```
public final String apiKey
```

### code

```
public final String code
```

### continueUrl

```
public final @Nullable String continueUrl
```

### languageCode

```
public final @Nullable String languageCode
```

## Public methods

### getApiKey

```
public @NonNull String getApiKey()
```

Returns the API key from the link.

### getCode

```
public @Nullable String getCode()
```

Returns the email action code from the link if present, otherwise null.

### getContinueUrl

```
public @Nullable String getContinueUrl()
```

Returns the continue URL from the link if present, otherwise null.

### getLanguageCode

```
public @Nullable String getLanguageCode()
```

Returns the language code from the link if present, otherwise null.

### getOperation

```
@ActionCodeResult.Operation
public int getOperation()
```

Returns the mapping of the mode string in the action code URL to a `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/ActionCodeResult.Operation`.

### parseLink

```
public static @Nullable ActionCodeUrl parseLink(@Nullable String link)
```

Returns an `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/ActionCodeUrl` instance if the `link` is valid, otherwise null.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | if `link` is null or empty |