Skip to main content

Login

POST /auth/b2b/login
devhttps://api.sandbox.ovok.com

This API endpoint logs a user in to a project.

Example cURL request

curl -X POST \
--url 'https://api.dev.ovok.com/auth/b2b/login' \
-H 'Content-Type: application/json' \
-d '{
"email": "max.mustermann@example.com",
"password": "A[.DmUv]2vE|n_+]",
"clientId": "87ea5dfc-8b8e-384d-8489-79496e706390",
"tenantId": "87ea5dfc-8b8e-384d-8489-79496e706390"
}'

Request body

Content-Type: application/json

  • email: string (required) — The user's email address.
  • password: string (required) — The user's password.
  • clientId: string (required) — ID of the client.
  • tenantId: string (required) — ID of the tenant.

Responses

CodeDescription
200Register response with tokens and IDs.
400The request could not be operated by the server.
401The resource owner or authorization server denied the request.
404The requested resource could not be found.
422The request could not be validated by the server.
500The server encountered an unexpected condition. Please try again later.

200ResponseRegisterLoginDto (application/json)

  • accessToken: string (required) — Bearer access token. Expires in 1 hour.
  • refreshToken: string — Refresh token.
  • expiresIn: integer — Token expiration.
  • project: object (required)
    • reference: string (required) — Reference of the project.
    • display: string (required) — Display name of the project.
  • profile: object (required)
    • reference: string (required) — Reference of the profile.
    • display: string (required) — Display name of the profile.

Example

{
"accessToken": "example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY",
"refreshToken": "example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY",
"expiresIn": 3600,
"project": {
"reference": "Project/f6f4da8d-93e8-8a08-220e-03b7810451d3",
"display": "My Medical Project"
},
"profile": {
"reference": "Patient/de5c57ff-7257-57b0-13ab-aab6f5f91498",
"display": "Max Mustermann"
}
}