# Submit consent to EULA

### Accept Terms

In order to submit the consent to EULA, the following API can be used.

### Concrete example

{% tabs %}
{% tab title="Swift" %}

```swift
let service = EULAService()
service.acceptTerms(then: { result in
    switch result {
    case .success:
        // terms accepted
    case .failure:
        // error
})
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
val eulaService = EulaService()
eulaService.submitConsent(EulaService.Consent.ACCEPT) { result: Result<Unit> ->
    if (result?.value == null || result.throwable != null) {
        // failure
    } else {
        // Success
    }
})
```

{% endtab %}
{% endtabs %}
