# Struct AuthenticationResponse

> Reference the data structure for authentication service responses.

Mirrors an [API response from the Unity Authentication Service](https://services.docs.unity.com/player-auth/v1/index.html#operation/ExternalTokenAuth).

##### Include

```cpp
#include "Models/AuthenticationResponse.h"
```

##### Syntax

```cpp
USTRUCT(BlueprintType)
struct AUTHENTICATION_API FAuthenticationResponse
```

## Fields

### WasSuccessful

Whether the response was a success.

#### Declaration

```cpp
bool bWasSuccessful = false
```

#### Blueprint

| **Name**       | **Type**                                                                                               | **Default Value** | **Blueprint Property Type** | **Blueprint Property Category**         |
| :------------- | :----------------------------------------------------------------------------------------------------- | :---------------- | :-------------------------- | :-------------------------------------- |
| Was Successful | [Boolean](https://docs.unrealengine.com/5.3/en-US/blueprint-variables-in-unreal-engine/#variabletypes) | `false`           | BlueprintReadOnly           | Unity Gaming Services \| Authentication |

#### C++

| **Name**         | **Type** | **Default Value** |
| :--------------- | :------- | :---------------- |
| `bWasSuccessful` | `bool`   | `false`           |

### UserId

The generated user Id.

#### Declaration

```cpp
FString UserId
```

#### Blueprint

| **Name** | **Type**                                                                                              | **Blueprint Property Type** | **Blueprint Property Category**         |
| :------- | :---------------------------------------------------------------------------------------------------- | :-------------------------- | :-------------------------------------- |
| User Id  | [String](https://docs.unrealengine.com/5.3/en-US/blueprint-variables-in-unreal-engine/#variabletypes) | BlueprintReadOnly           | Unity Gaming Services \| Authentication |

#### C++

| **Name** | **Type**                                                                                |
| :------- | :-------------------------------------------------------------------------------------- |
| `UserId` | [FString](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/Containers/FString/) |

### AccessToken

The generated authentication access token.

#### Declaration

```cpp
FString AccessToken
```

#### Blueprint

| **Name**     | **Type**                                                                                              | **Blueprint Property Type** | **Blueprint Property Category**         |
| :----------- | :---------------------------------------------------------------------------------------------------- | :-------------------------- | :-------------------------------------- |
| Access Token | [String](https://docs.unrealengine.com/5.3/en-US/blueprint-variables-in-unreal-engine/#variabletypes) | BlueprintReadOnly           | Unity Gaming Services \| Authentication |

#### C++

| **Name**      | **Type**                                                                                |
| :------------ | :-------------------------------------------------------------------------------------- |
| `AccessToken` | [FString](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/Containers/FString/) |

### SessionToken

The generated authentication session token. This token can be used to sign in the user again.

#### Declaration

```cpp
FString SessionToken
```

#### Blueprint

| **Name**      | **Type**                                                                                              | **Blueprint Property Type** | **Blueprint Property Category**         |
| :------------ | :---------------------------------------------------------------------------------------------------- | :-------------------------- | :-------------------------------------- |
| Session Token | [String](https://docs.unrealengine.com/5.3/en-US/blueprint-variables-in-unreal-engine/#variabletypes) | BlueprintReadOnly           | Unity Gaming Services \| Authentication |

#### C++

| **Name**       | **Type**                                                                                |
| :------------- | :-------------------------------------------------------------------------------------- |
| `SessionToken` | [FString](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/Containers/FString/) |

### AuthorizedTime

The time at which the response was sent.

#### Declaration

```cpp
FDateTime AuthorizedTime
```

#### Blueprint

| **Name**        | **Type**                                                                                                           | **Blueprint Property Type** | **Blueprint Property Category**         |
| :-------------- | :----------------------------------------------------------------------------------------------------------------- | :-------------------------- | :-------------------------------------- |
| Authorized Time | [Date Time Structure](https://docs.unrealengine.com/5.3/en-US/blueprint-variables-in-unreal-engine/#variabletypes) | BlueprintReadOnly           | Unity Gaming Services \| Authentication |

#### C++

| **Name**         | **Type**                                                                              |
| :--------------- | :------------------------------------------------------------------------------------ |
| `AuthorizedTime` | [FDateTime](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/Misc/FDateTime/) |

### ExpiresIn

The time at which the response was sent.

#### Declaration

```cpp
int32 ExpiresIn = 0
```

#### Blueprint

| **Name**   | **Type**                                                                                               | **Default Value** | **Blueprint Property Type** | **Blueprint Property Category**         |
| :--------- | :----------------------------------------------------------------------------------------------------- | :---------------- | :-------------------------- | :-------------------------------------- |
| Expires In | [Integer](https://docs.unrealengine.com/5.3/en-US/blueprint-variables-in-unreal-engine/#variabletypes) | `0`               | BlueprintReadOnly           | Unity Gaming Services \| Authentication |

#### C++

| **Name**    | **Type**                                                                                                       | **Default Value** |
| :---------- | :------------------------------------------------------------------------------------------------------------- | :---------------- |
| `ExpiresIn` | [int32](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/GenericPlatform/FGenericPlatformTypes/int32/) | `0`               |
