## API-URL
URL, an die HTTP-Anfragen gesendet werden:
```url
https://portal.bulkgate.com/api/1.0/otp/verify
```

> [!NOTE]
> Erreicht die Anfrage ihr Ziel nicht, wiederholen Sie sie auf dem [Backup-Server](https://www.bulkgate.com/de/dokumentation/api-verwaltung-und-tokens/backup-server/) `backup1.bulkgate.com`.

## Unterstützte HTTP-Methoden

- `POST` - `application/json`

```http
POST /api/1.0/otp/verify HTTP/1.1
Host: portal.bulkgate.com
Content-Type: application/json
```

## Parametertabelle

| PARAMETERNAME | WERT | PFLICHT | STANDARDWERT |
|:------------------|:----------------------------------------------|:----------|:--------------|
| application_id | [Anwendungs-ID](https://www.bulkgate.com/de/dokumentation/api-verwaltung-und-tokens/api-verwaltung/) | **Ja** | - |
| application_token | [Anwendungstoken](https://www.bulkgate.com/de/dokumentation/api-verwaltung-und-tokens/api-tokens/) | **Ja** | - |
| id | ID, die Sie beim Senden des Einmalpassworts erhalten haben | **Ja** | - |
| code | Zu verifizierender Code | **Ja** | - |


## Beispielanfrage

```http-json
POST /api/1.0/otp/verify HTTP/1.1
Host: portal.bulkgate.com
Content-Type: application/json

{
    "application_id": 451,
    "application_token": "NKN02TWE6NfBkfl-your-secret-token-Wf05GaqLIWLW4aBj",
    "id": "otp-id",
    "code": "0000"
}
```

## Antwort

**Bei Erfolg:**
```json
{
    "data": {
        "id": "otp-id",
        "verified": true
    }
}
```

**Bei ungültigem Code:**
```json
{
    "data": {
        "id": "otp-id",
        "verified": false
    }
}
```

**Bei einem Fehler:**
```json
{
    "type": "unknown_identity",
    "code": 400,
    "error": "Unknown identity",
    "detail": null
}
```

```json
{
    "type": "invalid_input_parameters",
    "code": 400,
    "error": "Invalid input parameters",
    "detail": null
}
```

Dabei gilt:

- **type** und **error** (Beschreibung des Fehlers) finden Sie in der [Tabelle der Fehlertypen](https://www.bulkgate.com/de/dokumentation/api-verwaltung-und-tokens/api-fehlertypen/)
- **code** ist der HTTP-Fehlercode
- **detail** enthält zusätzliche Informationen zum Fehler
