Authentication API (1.0)

Download OpenAPI specification:Download

Introduction

Authentication API allows an API client to fetch tokens for OviPro. OviPro API uses OAuth2 with JWT tokens for the authentication. Every request to OviPro API must contain a valid token.

Contact

If you have any questions, comments or feedback regarding our APIs, please contact developer@ovipro.fi.

Error codes

Below is the summary of most common error codes included in the response's errorCode field.

HTTP status code Error code Meaning
400 BAD_REQUEST_PARAMETERS Invalid request with e.g. missing mandatory parameters.
400 BAD_REQUEST_BODY Invalid request body with e.g. missing mandatory fields.
400 VALUE_REQUIRED Mandatory value missing for the request.
401 UNAUTHORIZED Unauthorized request.
404 INVALID_API_KEY Missing or invalid API key.
415 UNSUPPORTED_MEDIA_TYPE Unsupported media type.
500 TECHNICAL_ERROR A technical error has occurred.

Authentication

Authentication API allows an API client to fetch JWT tokens for OviPro.

Create a token for authentication

Create a new tokenr.

header Parameters
Request-ID
required
string <uuid> ^([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[8...
Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9

A unique id which identifies the HTTP request. The value of this header must be created by the client. This identifier is used for troubleshooting purposes.

Request Body schema: application/json

Contains the details for the authentication.

username
required
string

User name.

password
required
string

Client password.

Responses

Request samples

Content type
application/json
{
  • "username": "migration.kiinteistoykkonen",
  • "password": "bAytWznd7136ZSkmbqIvWo1lQvMZ2Q0bpvzFcaEvPkxOd3"
}

Response samples

Content type
application/json
{
  • "token_type": "Bearer",
  • "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIWzI1NiJ9.eyJzdWIiOiI0MjQyIiwibmFtZSI6Ikplc3NpY2EgVGVtcG9yYWwiLCJuaWNrbmFtZSI6Ikplc3MifQ.EDkUUxaM439gWLsQ8a8mJWIvQtgZe0et3O3z4Fd_J8o",
  • "expires_in": 900
}