Ga naar inhoud

Authenticatie

De authenticatie bestaat uit 2 API-calls

AI-Hub Login

Login

AI-Hub Login

Input Parameter Waarde
UserName AI-Hub gebruikersnaam
Password AI-Hub wachtwoord

Afhankelijk van de 2FA status op het account kan de output verschillen. De TwoFactorAuthenticationId wordt automatisch opgeslagen in een variabele.

Info

In de response body is TwoFactorSetupEnabled alleen true als de 2FA nog niet gekoppeld is, maar het gebruikersaccount zelf wel actief is.

2FA Actief

De reponse body van een account met 2FA geactiveerd AI-Hub Login 2fa Active

2FA In-Actief

De reponse body van een account waar 2FA uit staat. AI-Hub Login 2fa inactive

GetToken

Open vervolgens het request AI-Hub GetToken AI-Hub Login Token

# Input Parameter Waarde
1 grant_type password
2 AuthtenticationId Response-login/TwoFactorAuthenticationId
3 AuthenticationCode 2FA actief: Authenticator/2FA token
3 AuthenticationCode 2FA inactief: string

De response body ziet er als volgt uit:

AI-Hub GetToken response

Token

In elke vervolg API call dient de Token meegestuurd te worden als een Bearer + Token voor authenticatie en autorisatie.