Skip to main content

Login

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

The Login API endpoint facilitates the authentication process, allowing users to obtain a JWT (JSON Web Token) for subsequent authorized requests.
This API is crucial for secure access to Ovok services.

Example cURL request

curl -X POST \
--url 'https://api.dev.ovok.com/auth/login' \
-H 'Content-Type: application/json' \
-d '{
"email": "john.doe@mail.com",
"password": "password1234",
"clientId": "5e505642-9024-474d-9434-e5a44f505cc5"
}'

Request body

Content-Type: application/json

  • email: string (required) — The user's email address.
  • password: string (required) — The user's password.
  • clientId: string (required) — The client ID from the ClientApplication resource.

Responses

CodeDescription
200Access token, refresh token and expiration time.
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"
}
}